diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb71549..17426239cd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -16477,6 +16477,78 @@ components: required: - data type: object + DeletedSuiteResponseData: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuiteResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/DeletedSuiteType' + type: object + DeletedSuiteResponseDataAttributes: + properties: + deleted_at: + description: Deletion timestamp of the Synthetic suite ID. + type: string + public_id: + description: The Synthetic suite ID deleted. + type: string + type: object + DeletedSuiteType: + default: suites + enum: + - suites + example: suites + type: string + x-enum-varnames: + - SUITES + DeletedSuitesRequestDelete: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteAttributes' + id: + type: string + type: + $ref: '#/components/schemas/DeletedSuitesRequestType' + required: + - attributes + type: object + DeletedSuitesRequestDeleteAttributes: + properties: + force_delete_dependencies: + type: boolean + public_ids: + example: + - '' + items: + type: string + type: array + required: + - public_ids + type: object + DeletedSuitesRequestDeleteRequest: + properties: + data: + $ref: '#/components/schemas/DeletedSuitesRequestDelete' + required: + - data + type: object + DeletedSuitesRequestType: + default: delete_suites_request + enum: + - delete_suites_request + example: delete_suites_request + type: string + x-enum-varnames: + - DELETE_SUITES_REQUEST + DeletedSuitesResponse: + properties: + data: + items: + $ref: '#/components/schemas/DeletedSuiteResponseData' + type: array + type: object DependencyLocation: description: Static library vulnerability location. properties: @@ -51322,6 +51394,154 @@ components: format: double type: number type: object + SuiteCreateEdit: + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: + $ref: '#/components/schemas/SyntheticsSuiteType' + required: + - attributes + - type + type: object + SuiteCreateEditRequest: + properties: + data: + $ref: '#/components/schemas/SuiteCreateEdit' + required: + - data + type: object + SuiteSearchResponseType: + default: suites_search + enum: + - suites_search + example: suites_search + type: string + x-enum-varnames: + - SUITES_SEARCH + SyntheticsSuite: + description: Object containing details about a Synthetic suite. + properties: + message: + description: Notification message associated with the suite. + example: Notification message + type: string + name: + description: Name of the suite. + example: Example suite name + type: string + options: + $ref: '#/components/schemas/SyntheticsSuiteOptions' + tags: + description: Array of tags attached to the suite. + example: + - env:production + items: + description: A tag attached to the suite. + type: string + type: array + tests: + items: + $ref: '#/components/schemas/SyntheticsSuiteTest' + type: array + type: + $ref: '#/components/schemas/SyntheticsSuiteType' + required: + - name + - message + - type + - tests + - options + type: object + SyntheticsSuiteOptions: + description: Object describing the extra options for a Synthetic suite. + properties: + alerting: + $ref: '#/components/schemas/SyntheticsSuiteOptionsAlerting' + type: object + SyntheticsSuiteOptionsAlerting: + description: Alerting options for a Synthetics suite. + properties: + threshold: + description: Percentage of critical tests failure needed for a suite to + fail. + format: double + maximum: 1 + minimum: 0 + type: number + type: object + SyntheticsSuiteResponse: + description: Synthetics suite response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteResponseData' + type: object + SyntheticsSuiteResponseData: + description: Synthetics suite response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: object + SyntheticsSuiteSearchResponse: + description: Synthetics suite search response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseData' + type: object + SyntheticsSuiteSearchResponseData: + description: Synthetics suite search response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseDataAttributes' + id: + format: uuid + type: string + type: + $ref: '#/components/schemas/SuiteSearchResponseType' + type: object + SyntheticsSuiteSearchResponseDataAttributes: + description: Synthetics suite search response data attributes + properties: + suites: + items: + $ref: '#/components/schemas/SyntheticsSuite' + type: array + total: + format: int32 + maximum: 2147483647 + type: integer + type: object + SyntheticsSuiteTest: + description: Object containing details about a Synthetic test included in a + Synthetic suite. + properties: + alerting_criticality: + $ref: '#/components/schemas/SyntheticsSuiteTestAlertingCriticality' + public_id: + example: '' + type: string + required: + - public_id + type: object + SyntheticsSuiteTestAlertingCriticality: + description: Alerting criticality for each the test. + enum: + - ignore + - critical + example: critical + type: string + x-enum-varnames: + - IGNORE + - CRITICAL + SyntheticsSuiteType: + default: suite + description: Type of the Synthetic suite, `suite`. + enum: + - suite + example: suite + type: string + x-enum-varnames: + - SUITE TableResultV2: description: A reference table resource containing its full configuration and state. @@ -81694,6 +81914,227 @@ paths: operator: OR permissions: - billing_edit + /api/v2/synthetics/suites: + post: + operationId: CreateSyntheticsSuite + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Create a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + - synthetics_create_edit_trigger + /api/v2/synthetics/suites/bulk-delete: + post: + operationId: DeleteSyntheticsSuites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Bulk delete suites' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/synthetics/suites/search: + get: + description: Search for Synthetics suites. + operationId: SearchSuites + parameters: + - description: The search query. + in: query + name: query + required: false + schema: + type: string + - description: The sort order for the results (e.g., `name,asc` or `name,desc`). + in: query + name: sort + required: false + schema: + default: name,asc + type: string + - description: If true, return only facets instead of full test details. + in: query + name: facets_only + required: false + schema: + default: false + type: boolean + - description: The offset from which to start returning results. + in: query + name: start + required: false + schema: + default: 0 + format: int64 + type: integer + - description: The maximum number of results to return. + in: query + name: count + required: false + schema: + default: 50 + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Search Synthetics suites + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/suites/{public_id}: + get: + operationId: GetSyntheticsSuite + parameters: + - description: The public ID of the suite to get details from. + in: path + name: public_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: 'Synthetics: Get a suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + put: + operationId: EditSyntheticsSuite + parameters: + - description: The public ID of the suite to edit. + in: path + name: public_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + description: New suite details to be saved. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: edit a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write /api/v2/tags/enrichment: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 60fdfd49e2..436007b5a4 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6542,6 +6542,62 @@ datadog\_api\_client.v2.model.delete\_custom\_framework\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.deleted\_suite\_response\_data module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suite_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suite\_response\_data\_attributes module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suite_response_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suite\_type module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suite_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_delete module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_delete + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_delete\_attributes module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_delete_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_delete\_request module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_delete_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_response module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dependency\_location module --------------------------------------------------------- @@ -22684,6 +22740,104 @@ datadog\_api\_client.v2.model.step\_display\_bounds module :members: :show-inheritance: +datadog\_api\_client.v2.model.suite\_create\_edit module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_create_edit + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_create\_edit\_request module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_create_edit_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_search\_response\_type module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.suite_search_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_options module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_options + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_options\_alerting module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_options_alerting + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_response module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_response\_data module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_search\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_search_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_search\_response\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_search_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_search\_response\_data\_attributes module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_test module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_test + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_test\_alerting\_criticality module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_type module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.table\_result\_v2 module ------------------------------------------------------ diff --git a/examples/v2/synthetics/CreateSyntheticsSuite.py b/examples/v2/synthetics/CreateSyntheticsSuite.py new file mode 100644 index 0000000000..c048005095 --- /dev/null +++ b/examples/v2/synthetics/CreateSyntheticsSuite.py @@ -0,0 +1,46 @@ +""" +Synthetics: Create a test suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite +from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions +from datadog_api_client.v2.model.synthetics_suite_options_alerting import SyntheticsSuiteOptionsAlerting +from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest +from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, +) +from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + +body = SuiteCreateEditRequest( + data=SuiteCreateEdit( + attributes=SyntheticsSuite( + message="Notification message", + name="Example suite name", + options=SyntheticsSuiteOptions( + alerting=SyntheticsSuiteOptionsAlerting(), + ), + tags=[ + "env:production", + ], + tests=[ + SyntheticsSuiteTest( + alerting_criticality=SyntheticsSuiteTestAlertingCriticality.CRITICAL, + public_id="", + ), + ], + type=SyntheticsSuiteType.SUITE, + ), + type=SyntheticsSuiteType.SUITE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.create_synthetics_suite(body=body) + + print(response) diff --git a/examples/v2/synthetics/DeleteSyntheticsSuites.py b/examples/v2/synthetics/DeleteSyntheticsSuites.py new file mode 100644 index 0000000000..e0967da2f0 --- /dev/null +++ b/examples/v2/synthetics/DeleteSyntheticsSuites.py @@ -0,0 +1,28 @@ +""" +Synthetics: Bulk delete suites returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete +from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import DeletedSuitesRequestDeleteAttributes +from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest +from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType + +body = DeletedSuitesRequestDeleteRequest( + data=DeletedSuitesRequestDelete( + attributes=DeletedSuitesRequestDeleteAttributes( + public_ids=[ + "", + ], + ), + type=DeletedSuitesRequestType.DELETE_SUITES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.delete_synthetics_suites(body=body) + + print(response) diff --git a/examples/v2/synthetics/EditSyntheticsSuite.py b/examples/v2/synthetics/EditSyntheticsSuite.py new file mode 100644 index 0000000000..ac00811f0f --- /dev/null +++ b/examples/v2/synthetics/EditSyntheticsSuite.py @@ -0,0 +1,46 @@ +""" +Synthetics: edit a test suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite +from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions +from datadog_api_client.v2.model.synthetics_suite_options_alerting import SyntheticsSuiteOptionsAlerting +from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest +from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, +) +from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + +body = SuiteCreateEditRequest( + data=SuiteCreateEdit( + attributes=SyntheticsSuite( + message="Notification message", + name="Example suite name", + options=SyntheticsSuiteOptions( + alerting=SyntheticsSuiteOptionsAlerting(), + ), + tags=[ + "env:production", + ], + tests=[ + SyntheticsSuiteTest( + alerting_criticality=SyntheticsSuiteTestAlertingCriticality.CRITICAL, + public_id="", + ), + ], + type=SyntheticsSuiteType.SUITE, + ), + type=SyntheticsSuiteType.SUITE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.edit_synthetics_suite(public_id="public_id", body=body) + + print(response) diff --git a/examples/v2/synthetics/GetSyntheticsSuite.py b/examples/v2/synthetics/GetSyntheticsSuite.py new file mode 100644 index 0000000000..25371dfe80 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsSuite.py @@ -0,0 +1,15 @@ +""" +Synthetics: Get a suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_synthetics_suite( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/SearchSuites.py b/examples/v2/synthetics/SearchSuites.py new file mode 100644 index 0000000000..564fdbd3ce --- /dev/null +++ b/examples/v2/synthetics/SearchSuites.py @@ -0,0 +1,13 @@ +""" +Search Synthetics suites returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.search_suites() + + print(response) diff --git a/src/datadog_api_client/v2/api/synthetics_api.py b/src/datadog_api_client/v2/api/synthetics_api.py index 7d8b21f8e3..00f5f43cda 100644 --- a/src/datadog_api_client/v2/api/synthetics_api.py +++ b/src/datadog_api_client/v2/api/synthetics_api.py @@ -3,12 +3,21 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict +from typing import Any, Dict, Union from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) from datadog_api_client.v2.model.on_demand_concurrency_cap_response import OnDemandConcurrencyCapResponse from datadog_api_client.v2.model.on_demand_concurrency_cap_attributes import OnDemandConcurrencyCapAttributes +from datadog_api_client.v2.model.synthetics_suite_response import SyntheticsSuiteResponse +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.deleted_suites_response import DeletedSuitesResponse +from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest +from datadog_api_client.v2.model.synthetics_suite_search_response import SyntheticsSuiteSearchResponse class SyntheticsApi: @@ -27,6 +36,72 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._create_synthetics_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites", + "operation_id": "create_synthetics_suite", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (SuiteCreateEditRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_synthetics_suites_endpoint = _Endpoint( + settings={ + "response_type": (DeletedSuitesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/bulk-delete", + "operation_id": "delete_synthetics_suites", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (DeletedSuitesRequestDeleteRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._edit_synthetics_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/{public_id}", + "operation_id": "edit_synthetics_suite", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (SuiteCreateEditRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._get_on_demand_concurrency_cap_endpoint = _Endpoint( settings={ "response_type": (OnDemandConcurrencyCapResponse,), @@ -43,6 +118,71 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_synthetics_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/{public_id}", + "operation_id": "get_synthetics_suite", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._search_suites_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteSearchResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/search", + "operation_id": "search_suites", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "facets_only": { + "openapi_types": (bool,), + "attribute": "facets_only", + "location": "query", + }, + "start": { + "openapi_types": (int,), + "attribute": "start", + "location": "query", + }, + "count": { + "openapi_types": (int,), + "attribute": "count", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._set_on_demand_concurrency_cap_endpoint = _Endpoint( settings={ "response_type": (OnDemandConcurrencyCapResponse,), @@ -63,6 +203,54 @@ def __init__(self, api_client=None): api_client=api_client, ) + def create_synthetics_suite( + self, + body: SuiteCreateEditRequest, + ) -> SyntheticsSuiteResponse: + """Synthetics: Create a test suite. + + :type body: SuiteCreateEditRequest + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_synthetics_suite_endpoint.call_with_http_info(**kwargs) + + def delete_synthetics_suites( + self, + body: DeletedSuitesRequestDeleteRequest, + ) -> DeletedSuitesResponse: + """Synthetics: Bulk delete suites. + + :type body: DeletedSuitesRequestDeleteRequest + :rtype: DeletedSuitesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._delete_synthetics_suites_endpoint.call_with_http_info(**kwargs) + + def edit_synthetics_suite( + self, + public_id: str, + body: SuiteCreateEditRequest, + ) -> SyntheticsSuiteResponse: + """Synthetics: edit a test suite. + + :param public_id: The public ID of the suite to edit. + :type public_id: str + :param body: New suite details to be saved. + :type body: SuiteCreateEditRequest + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + kwargs["body"] = body + + return self._edit_synthetics_suite_endpoint.call_with_http_info(**kwargs) + def get_on_demand_concurrency_cap( self, ) -> OnDemandConcurrencyCapResponse: @@ -75,6 +263,64 @@ def get_on_demand_concurrency_cap( kwargs: Dict[str, Any] = {} return self._get_on_demand_concurrency_cap_endpoint.call_with_http_info(**kwargs) + def get_synthetics_suite( + self, + public_id: str, + ) -> SyntheticsSuiteResponse: + """Synthetics: Get a suite. + + :param public_id: The public ID of the suite to get details from. + :type public_id: str + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + return self._get_synthetics_suite_endpoint.call_with_http_info(**kwargs) + + def search_suites( + self, + *, + query: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + facets_only: Union[bool, UnsetType] = unset, + start: Union[int, UnsetType] = unset, + count: Union[int, UnsetType] = unset, + ) -> SyntheticsSuiteSearchResponse: + """Search Synthetics suites. + + Search for Synthetics suites. + + :param query: The search query. + :type query: str, optional + :param sort: The sort order for the results (e.g., ``name,asc`` or ``name,desc`` ). + :type sort: str, optional + :param facets_only: If true, return only facets instead of full test details. + :type facets_only: bool, optional + :param start: The offset from which to start returning results. + :type start: int, optional + :param count: The maximum number of results to return. + :type count: int, optional + :rtype: SyntheticsSuiteSearchResponse + """ + kwargs: Dict[str, Any] = {} + if query is not unset: + kwargs["query"] = query + + if sort is not unset: + kwargs["sort"] = sort + + if facets_only is not unset: + kwargs["facets_only"] = facets_only + + if start is not unset: + kwargs["start"] = start + + if count is not unset: + kwargs["count"] = count + + return self._search_suites_endpoint.call_with_http_info(**kwargs) + def set_on_demand_concurrency_cap( self, body: OnDemandConcurrencyCapAttributes, diff --git a/src/datadog_api_client/v2/model/deleted_suite_response_data.py b/src/datadog_api_client/v2/model/deleted_suite_response_data.py new file mode 100644 index 0000000000..4ef687d1b3 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suite_response_data.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.deleted_suite_response_data_attributes import DeletedSuiteResponseDataAttributes + from datadog_api_client.v2.model.deleted_suite_type import DeletedSuiteType + + +class DeletedSuiteResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suite_response_data_attributes import ( + DeletedSuiteResponseDataAttributes, + ) + from datadog_api_client.v2.model.deleted_suite_type import DeletedSuiteType + + return { + "attributes": (DeletedSuiteResponseDataAttributes,), + "id": (str,), + "type": (DeletedSuiteType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[DeletedSuiteResponseDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[DeletedSuiteType, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: DeletedSuiteResponseDataAttributes, optional + + :param id: + :type id: str, optional + + :param type: + :type type: DeletedSuiteType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py b/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py new file mode 100644 index 0000000000..58dc23ac18 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py @@ -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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeletedSuiteResponseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "deleted_at": (str,), + "public_id": (str,), + } + + attribute_map = { + "deleted_at": "deleted_at", + "public_id": "public_id", + } + + def __init__(self_, deleted_at: Union[str, UnsetType] = unset, public_id: Union[str, UnsetType] = unset, **kwargs): + """ + + + :param deleted_at: Deletion timestamp of the Synthetic suite ID. + :type deleted_at: str, optional + + :param public_id: The Synthetic suite ID deleted. + :type public_id: str, optional + """ + if deleted_at is not unset: + kwargs["deleted_at"] = deleted_at + if public_id is not unset: + kwargs["public_id"] = public_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/deleted_suite_type.py b/src/datadog_api_client/v2/model/deleted_suite_type.py new file mode 100644 index 0000000000..f0d6392ad4 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suite_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DeletedSuiteType(ModelSimple): + """ + + + :param value: If omitted defaults to "suites". Must be one of ["suites"]. + :type value: str + """ + + allowed_values = { + "suites", + } + SUITES: ClassVar["DeletedSuiteType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DeletedSuiteType.SUITES = DeletedSuiteType("suites") diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_delete.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete.py new file mode 100644 index 0000000000..ba79c280d4 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_delete.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import ( + DeletedSuitesRequestDeleteAttributes, + ) + from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType + + +class DeletedSuitesRequestDelete(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import ( + DeletedSuitesRequestDeleteAttributes, + ) + from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType + + return { + "attributes": (DeletedSuitesRequestDeleteAttributes,), + "id": (str,), + "type": (DeletedSuitesRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: DeletedSuitesRequestDeleteAttributes, + id: Union[str, UnsetType] = unset, + type: Union[DeletedSuitesRequestType, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: DeletedSuitesRequestDeleteAttributes + + :param id: + :type id: str, optional + + :param type: + :type type: DeletedSuitesRequestType, optional + """ + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) + + self_.attributes = attributes diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py new file mode 100644 index 0000000000..d8b88938ae --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py @@ -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. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeletedSuitesRequestDeleteAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "force_delete_dependencies": (bool,), + "public_ids": ([str],), + } + + attribute_map = { + "force_delete_dependencies": "force_delete_dependencies", + "public_ids": "public_ids", + } + + def __init__(self_, public_ids: List[str], force_delete_dependencies: Union[bool, UnsetType] = unset, **kwargs): + """ + + + :param force_delete_dependencies: + :type force_delete_dependencies: bool, optional + + :param public_ids: + :type public_ids: [str] + """ + if force_delete_dependencies is not unset: + kwargs["force_delete_dependencies"] = force_delete_dependencies + super().__init__(kwargs) + + self_.public_ids = public_ids diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.py new file mode 100644 index 0000000000..9e8b5c0345 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete + + +class DeletedSuitesRequestDeleteRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete + + return { + "data": (DeletedSuitesRequestDelete,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DeletedSuitesRequestDelete, **kwargs): + """ + + + :param data: + :type data: DeletedSuitesRequestDelete + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_type.py b/src/datadog_api_client/v2/model/deleted_suites_request_type.py new file mode 100644 index 0000000000..a3aeab6e59 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DeletedSuitesRequestType(ModelSimple): + """ + + + :param value: If omitted defaults to "delete_suites_request". Must be one of ["delete_suites_request"]. + :type value: str + """ + + allowed_values = { + "delete_suites_request", + } + DELETE_SUITES_REQUEST: ClassVar["DeletedSuitesRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DeletedSuitesRequestType.DELETE_SUITES_REQUEST = DeletedSuitesRequestType("delete_suites_request") diff --git a/src/datadog_api_client/v2/model/deleted_suites_response.py b/src/datadog_api_client/v2/model/deleted_suites_response.py new file mode 100644 index 0000000000..637ebf027d --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.deleted_suite_response_data import DeletedSuiteResponseData + + +class DeletedSuitesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suite_response_data import DeletedSuiteResponseData + + return { + "data": ([DeletedSuiteResponseData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[DeletedSuiteResponseData], UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: [DeletedSuiteResponseData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/suite_create_edit.py b/src/datadog_api_client/v2/model/suite_create_edit.py new file mode 100644 index 0000000000..662475acc5 --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_create_edit.py @@ -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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + + +class SuiteCreateEdit(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + + return { + "attributes": (SyntheticsSuite,), + "type": (SyntheticsSuiteType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: SyntheticsSuite, type: SyntheticsSuiteType, **kwargs): + """ + + + :param attributes: Object containing details about a Synthetic suite. + :type attributes: SyntheticsSuite + + :param type: Type of the Synthetic suite, ``suite``. + :type type: SyntheticsSuiteType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/suite_create_edit_request.py b/src/datadog_api_client/v2/model/suite_create_edit_request.py new file mode 100644 index 0000000000..8ce9a26d0e --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_create_edit_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit + + +class SuiteCreateEditRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit + + return { + "data": (SuiteCreateEdit,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: SuiteCreateEdit, **kwargs): + """ + + + :param data: + :type data: SuiteCreateEdit + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/suite_search_response_type.py b/src/datadog_api_client/v2/model/suite_search_response_type.py new file mode 100644 index 0000000000..fe5cf1443d --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_search_response_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SuiteSearchResponseType(ModelSimple): + """ + + + :param value: If omitted defaults to "suites_search". Must be one of ["suites_search"]. + :type value: str + """ + + allowed_values = { + "suites_search", + } + SUITES_SEARCH: ClassVar["SuiteSearchResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SuiteSearchResponseType.SUITES_SEARCH = SuiteSearchResponseType("suites_search") diff --git a/src/datadog_api_client/v2/model/synthetics_suite.py b/src/datadog_api_client/v2/model/synthetics_suite.py new file mode 100644 index 0000000000..b57fa08afa --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite.py @@ -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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions + from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest + from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + + +class SyntheticsSuite(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions + from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest + from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + + return { + "message": (str,), + "name": (str,), + "options": (SyntheticsSuiteOptions,), + "tags": ([str],), + "tests": ([SyntheticsSuiteTest],), + "type": (SyntheticsSuiteType,), + } + + attribute_map = { + "message": "message", + "name": "name", + "options": "options", + "tags": "tags", + "tests": "tests", + "type": "type", + } + + def __init__( + self_, + message: str, + name: str, + options: SyntheticsSuiteOptions, + tests: List[SyntheticsSuiteTest], + type: SyntheticsSuiteType, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Object containing details about a Synthetic suite. + + :param message: Notification message associated with the suite. + :type message: str + + :param name: Name of the suite. + :type name: str + + :param options: Object describing the extra options for a Synthetic suite. + :type options: SyntheticsSuiteOptions + + :param tags: Array of tags attached to the suite. + :type tags: [str], optional + + :param tests: + :type tests: [SyntheticsSuiteTest] + + :param type: Type of the Synthetic suite, ``suite``. + :type type: SyntheticsSuiteType + """ + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.message = message + self_.name = name + self_.options = options + self_.tests = tests + self_.type = type diff --git a/src/datadog_api_client/v2/model/synthetics_suite_options.py b/src/datadog_api_client/v2/model/synthetics_suite_options.py new file mode 100644 index 0000000000..74eda6ed11 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_options.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_options_alerting import SyntheticsSuiteOptionsAlerting + + +class SyntheticsSuiteOptions(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_options_alerting import SyntheticsSuiteOptionsAlerting + + return { + "alerting": (SyntheticsSuiteOptionsAlerting,), + } + + attribute_map = { + "alerting": "alerting", + } + + def __init__(self_, alerting: Union[SyntheticsSuiteOptionsAlerting, UnsetType] = unset, **kwargs): + """ + Object describing the extra options for a Synthetic suite. + + :param alerting: Alerting options for a Synthetics suite. + :type alerting: SyntheticsSuiteOptionsAlerting, optional + """ + if alerting is not unset: + kwargs["alerting"] = alerting + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_options_alerting.py b/src/datadog_api_client/v2/model/synthetics_suite_options_alerting.py new file mode 100644 index 0000000000..2e92c09a7f --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_options_alerting.py @@ -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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsSuiteOptionsAlerting(ModelNormal): + validations = { + "threshold": { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "threshold": (float,), + } + + attribute_map = { + "threshold": "threshold", + } + + def __init__(self_, threshold: Union[float, UnsetType] = unset, **kwargs): + """ + Alerting options for a Synthetics suite. + + :param threshold: Percentage of critical tests failure needed for a suite to fail. + :type threshold: float, optional + """ + if threshold is not unset: + kwargs["threshold"] = threshold + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_response.py b/src/datadog_api_client/v2/model/synthetics_suite_response.py new file mode 100644 index 0000000000..548f00063d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_response_data import SyntheticsSuiteResponseData + + +class SyntheticsSuiteResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_response_data import SyntheticsSuiteResponseData + + return { + "data": (SyntheticsSuiteResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[SyntheticsSuiteResponseData, UnsetType] = unset, **kwargs): + """ + Synthetics suite response + + :param data: Synthetics suite response data + :type data: SyntheticsSuiteResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_response_data.py b/src/datadog_api_client/v2/model/synthetics_suite_response_data.py new file mode 100644 index 0000000000..b2454f1cb6 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_response_data.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + +class SyntheticsSuiteResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + return { + "attributes": (SyntheticsSuite,), + } + + attribute_map = { + "attributes": "attributes", + } + + def __init__(self_, attributes: Union[SyntheticsSuite, UnsetType] = unset, **kwargs): + """ + Synthetics suite response data + + :param attributes: Object containing details about a Synthetic suite. + :type attributes: SyntheticsSuite, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_search_response.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response.py new file mode 100644 index 0000000000..67340a1f80 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_search_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_search_response_data import SyntheticsSuiteSearchResponseData + + +class SyntheticsSuiteSearchResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_search_response_data import SyntheticsSuiteSearchResponseData + + return { + "data": (SyntheticsSuiteSearchResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[SyntheticsSuiteSearchResponseData, UnsetType] = unset, **kwargs): + """ + Synthetics suite search response + + :param data: Synthetics suite search response data + :type data: SyntheticsSuiteSearchResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_search_response_data.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data.py new file mode 100644 index 0000000000..ef55ea9895 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes import ( + SyntheticsSuiteSearchResponseDataAttributes, + ) + from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType + + +class SyntheticsSuiteSearchResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes import ( + SyntheticsSuiteSearchResponseDataAttributes, + ) + from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType + + return { + "attributes": (SyntheticsSuiteSearchResponseDataAttributes,), + "id": (UUID,), + "type": (SuiteSearchResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsSuiteSearchResponseDataAttributes, UnsetType] = unset, + id: Union[UUID, UnsetType] = unset, + type: Union[SuiteSearchResponseType, UnsetType] = unset, + **kwargs, + ): + """ + Synthetics suite search response data + + :param attributes: Synthetics suite search response data attributes + :type attributes: SyntheticsSuiteSearchResponseDataAttributes, optional + + :param id: + :type id: UUID, optional + + :param type: + :type type: SuiteSearchResponseType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py new file mode 100644 index 0000000000..1497b85adb --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py @@ -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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + +class SyntheticsSuiteSearchResponseDataAttributes(ModelNormal): + validations = { + "total": { + "inclusive_maximum": 2147483647, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + return { + "suites": ([SyntheticsSuite],), + "total": (int,), + } + + attribute_map = { + "suites": "suites", + "total": "total", + } + + def __init__( + self_, suites: Union[List[SyntheticsSuite], UnsetType] = unset, total: Union[int, UnsetType] = unset, **kwargs + ): + """ + Synthetics suite search response data attributes + + :param suites: + :type suites: [SyntheticsSuite], optional + + :param total: + :type total: int, optional + """ + if suites is not unset: + kwargs["suites"] = suites + if total is not unset: + kwargs["total"] = total + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_test.py b/src/datadog_api_client/v2/model/synthetics_suite_test.py new file mode 100644 index 0000000000..aea30d1179 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_test.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, + ) + + +class SyntheticsSuiteTest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, + ) + + return { + "alerting_criticality": (SyntheticsSuiteTestAlertingCriticality,), + "public_id": (str,), + } + + attribute_map = { + "alerting_criticality": "alerting_criticality", + "public_id": "public_id", + } + + def __init__( + self_, + public_id: str, + alerting_criticality: Union[SyntheticsSuiteTestAlertingCriticality, UnsetType] = unset, + **kwargs, + ): + """ + Object containing details about a Synthetic test included in a Synthetic suite. + + :param alerting_criticality: Alerting criticality for each the test. + :type alerting_criticality: SyntheticsSuiteTestAlertingCriticality, optional + + :param public_id: + :type public_id: str + """ + if alerting_criticality is not unset: + kwargs["alerting_criticality"] = alerting_criticality + super().__init__(kwargs) + + self_.public_id = public_id diff --git a/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py b/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py new file mode 100644 index 0000000000..5bf3ac8f2e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py @@ -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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsSuiteTestAlertingCriticality(ModelSimple): + """ + Alerting criticality for each the test. + + :param value: Must be one of ["ignore", "critical"]. + :type value: str + """ + + allowed_values = { + "ignore", + "critical", + } + IGNORE: ClassVar["SyntheticsSuiteTestAlertingCriticality"] + CRITICAL: ClassVar["SyntheticsSuiteTestAlertingCriticality"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsSuiteTestAlertingCriticality.IGNORE = SyntheticsSuiteTestAlertingCriticality("ignore") +SyntheticsSuiteTestAlertingCriticality.CRITICAL = SyntheticsSuiteTestAlertingCriticality("critical") diff --git a/src/datadog_api_client/v2/model/synthetics_suite_type.py b/src/datadog_api_client/v2/model/synthetics_suite_type.py new file mode 100644 index 0000000000..7fa6111014 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsSuiteType(ModelSimple): + """ + Type of the Synthetic suite, `suite`. + + :param value: If omitted defaults to "suite". Must be one of ["suite"]. + :type value: str + """ + + allowed_values = { + "suite", + } + SUITE: ClassVar["SyntheticsSuiteType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsSuiteType.SUITE = SyntheticsSuiteType("suite") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 9cece11cff..36131112ac 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1321,6 +1321,14 @@ from datadog_api_client.v2.model.delete_apps_response import DeleteAppsResponse from datadog_api_client.v2.model.delete_apps_response_data_items import DeleteAppsResponseDataItems from datadog_api_client.v2.model.delete_custom_framework_response import DeleteCustomFrameworkResponse +from datadog_api_client.v2.model.deleted_suite_response_data import DeletedSuiteResponseData +from datadog_api_client.v2.model.deleted_suite_response_data_attributes import DeletedSuiteResponseDataAttributes +from datadog_api_client.v2.model.deleted_suite_type import DeletedSuiteType +from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete +from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import DeletedSuitesRequestDeleteAttributes +from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest +from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType +from datadog_api_client.v2.model.deleted_suites_response import DeletedSuitesResponse from datadog_api_client.v2.model.dependency_location import DependencyLocation from datadog_api_client.v2.model.deployment import Deployment from datadog_api_client.v2.model.deployment_attributes import DeploymentAttributes @@ -4541,6 +4549,24 @@ from datadog_api_client.v2.model.step import Step from datadog_api_client.v2.model.step_display import StepDisplay from datadog_api_client.v2.model.step_display_bounds import StepDisplayBounds +from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType +from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite +from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions +from datadog_api_client.v2.model.synthetics_suite_options_alerting import SyntheticsSuiteOptionsAlerting +from datadog_api_client.v2.model.synthetics_suite_response import SyntheticsSuiteResponse +from datadog_api_client.v2.model.synthetics_suite_response_data import SyntheticsSuiteResponseData +from datadog_api_client.v2.model.synthetics_suite_search_response import SyntheticsSuiteSearchResponse +from datadog_api_client.v2.model.synthetics_suite_search_response_data import SyntheticsSuiteSearchResponseData +from datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes import ( + SyntheticsSuiteSearchResponseDataAttributes, +) +from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest +from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, +) +from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType from datadog_api_client.v2.model.table_result_v2 import TableResultV2 from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data @@ -5907,6 +5933,14 @@ "DeleteAppsResponse", "DeleteAppsResponseDataItems", "DeleteCustomFrameworkResponse", + "DeletedSuiteResponseData", + "DeletedSuiteResponseDataAttributes", + "DeletedSuiteType", + "DeletedSuitesRequestDelete", + "DeletedSuitesRequestDeleteAttributes", + "DeletedSuitesRequestDeleteRequest", + "DeletedSuitesRequestType", + "DeletedSuitesResponse", "DependencyLocation", "Deployment", "DeploymentAttributes", @@ -8197,6 +8231,20 @@ "Step", "StepDisplay", "StepDisplayBounds", + "SuiteCreateEdit", + "SuiteCreateEditRequest", + "SuiteSearchResponseType", + "SyntheticsSuite", + "SyntheticsSuiteOptions", + "SyntheticsSuiteOptionsAlerting", + "SyntheticsSuiteResponse", + "SyntheticsSuiteResponseData", + "SyntheticsSuiteSearchResponse", + "SyntheticsSuiteSearchResponseData", + "SyntheticsSuiteSearchResponseDataAttributes", + "SyntheticsSuiteTest", + "SyntheticsSuiteTestAlertingCriticality", + "SyntheticsSuiteType", "TableResultV2", "TableResultV2Array", "TableResultV2Data", diff --git a/tests/v2/features/synthetics.feature b/tests/v2/features/synthetics.feature index 73efa73ec2..7a7765094e 100644 --- a/tests/v2/features/synthetics.feature +++ b/tests/v2/features/synthetics.feature @@ -27,3 +27,73 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK And the response "data.attributes.on_demand_concurrency_cap" is equal to 20 + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "API error response." response + Given new "SearchSuites" request + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "OK" response + Given new "SearchSuites" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "API error response." response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "OK" response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "API error response." response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "OK" response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "API error response." response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "OK" response + Given new "GetSyntheticsSuite" 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-managing + Scenario: Synthetics: edit a test suite returns "API error response." response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: edit a test suite returns "OK" response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 3799e64e63..fdf1168878 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4284,6 +4284,40 @@ "type": "safe" } }, + "CreateSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "DeleteSyntheticsSuites": { + "tag": "Synthetics", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "SearchSuites": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "EditSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "ListTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": {