diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 150bd49be1..642f5da9b9 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -17622,8 +17622,10 @@ components: type: string type: object SyntheticsRestrictedRoles: + deprecated: true description: A list of role identifiers that can be pulled from the Roles API, - for restricting read and write access. + for restricting read and write access. This field is deprecated. Use the restriction + policies API to manage permissions. example: - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx items: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d649e72947..04028edd5b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17446,70 +17446,6 @@ components: required: - data type: object - DeletedSuiteResponseData: - properties: - attributes: - $ref: '#/components/schemas/DeletedSuiteResponseDataAttributes' - id: - type: string - type: - $ref: '#/components/schemas/SyntheticsSuiteTypes' - 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 - 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: @@ -49570,6 +49506,18 @@ components: meta: $ref: '#/components/schemas/ResponseMetaAttributes' type: object + SecurityMonitoringPaginatedSuppressionsResponse: + description: Response object containing the available suppression rules with + pagination metadata. + properties: + data: + description: A list of suppressions objects. + items: + $ref: '#/components/schemas/SecurityMonitoringSuppression' + type: array + meta: + $ref: '#/components/schemas/SecurityMonitoringSuppressionsMeta' + type: object SecurityMonitoringReferenceTable: description: Reference tables used in the queries. properties: @@ -51719,6 +51667,31 @@ components: data: $ref: '#/components/schemas/SecurityMonitoringSuppression' type: object + SecurityMonitoringSuppressionSort: + description: The sort parameters used for querying suppression rules. + enum: + - name + - start_date + - expiration_date + - update_date + - enabled + - -name + - -start_date + - -expiration_date + - -update_date + - -enabled + type: string + x-enum-varnames: + - NAME + - START_DATE + - EXPIRATION_DATE + - UPDATE_DATE + - ENABLED + - NAME_DESCENDING + - START_DATE_DESCENDING + - EXPIRATION_DATE_DESCENDING + - UPDATE_DATE_DESCENDING + - ENABLED_DESCENDING SecurityMonitoringSuppressionType: default: suppressions description: The type of the resource. The value should always be `suppressions`. @@ -51814,6 +51787,31 @@ components: required: - data type: object + SecurityMonitoringSuppressionsMeta: + description: Metadata for the suppression list response. + properties: + page: + $ref: '#/components/schemas/SecurityMonitoringSuppressionsPageMeta' + type: object + SecurityMonitoringSuppressionsPageMeta: + description: Pagination metadata. + properties: + pageNumber: + description: Current page number. + example: 0 + format: int64 + type: integer + pageSize: + description: Current page size. + example: 2 + format: int64 + type: integer + totalCount: + description: Total count of suppressions. + example: 2 + format: int64 + type: integer + type: object SecurityMonitoringSuppressionsResponse: description: Response object containing the available suppression rules. properties: @@ -55497,31 +55495,6 @@ components: format: double type: number type: object - SuiteCreateEdit: - properties: - attributes: - $ref: '#/components/schemas/SyntheticsSuite' - type: - $ref: '#/components/schemas/SyntheticsSuiteTypes' - 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 SuppressionVersionHistory: description: Response object containing the version history of a suppression. properties: @@ -55696,8 +55669,10 @@ components: type: string type: object SyntheticsRestrictedRoles: + deprecated: true description: A list of role identifiers that can be pulled from the Roles API, - for restricting read and write access. + for restricting read and write access. This field is deprecated. Use the restriction + policies API to manage permissions. example: - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx items: @@ -55705,149 +55680,6 @@ components: example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx type: string type: array - SyntheticsSuite: - description: Object containing details about a Synthetic suite. - properties: - message: - description: Notification message associated with the suite. - 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 suite. - example: Example suite name - type: string - options: - $ref: '#/components/schemas/SyntheticsSuiteOptions' - public_id: - description: The public ID for the test. - example: 123-abc-456 - readOnly: true - type: string - 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 - - type - - tests - - options - type: object - SyntheticsSuiteOptions: - description: Object describing the extra options for a Synthetic suite. - properties: - alerting_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' - id: - description: The public ID for the suite. - example: 123-abc-456 - readOnly: true - type: string - type: - $ref: '#/components/schemas/SyntheticsSuiteTypes' - 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 - SyntheticsSuiteTypes: - default: suites - description: Type for the Synthetics suites responses, `suites`. - enum: - - suites - example: suites - type: string - x-enum-varnames: - - SUITES SyntheticsVariableParser: description: Details of the parser to use for the global variable. example: @@ -86359,12 +86191,29 @@ paths: required: false schema: type: string + - description: Attribute used to sort the list of suppression rules. Prefix + with `-` to sort in descending order. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/SecurityMonitoringSuppressionSort' + - description: Size for a given page. Use `-1` to return all items. + in: query + name: page[size] + required: false + schema: + default: -1 + example: 10 + format: int64 + type: integer + - $ref: '#/components/parameters/PageNumber' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SecurityMonitoringSuppressionsResponse' + $ref: '#/components/schemas/SecurityMonitoringPaginatedSuppressionsResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -89328,227 +89177,6 @@ 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/synthetics/variables/{variable_id}/jsonpatch: patch: description: 'Patch a global variable using JSON Patch (RFC 6902). diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 74c5ed156f..418327ac64 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6927,55 +6927,6 @@ 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\_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 --------------------------------------------------------- @@ -21921,6 +21872,13 @@ datadog\_api\_client.v2.model.security\_monitoring\_list\_rules\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.security\_monitoring\_paginated\_suppressions\_response module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.security_monitoring_paginated_suppressions_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.security\_monitoring\_reference\_table module --------------------------------------------------------------------------- @@ -22558,6 +22516,13 @@ datadog\_api\_client.v2.model.security\_monitoring\_suppression\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.security\_monitoring\_suppression\_sort module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.security_monitoring_suppression_sort + :members: + :show-inheritance: + datadog\_api\_client.v2.model.security\_monitoring\_suppression\_type module ---------------------------------------------------------------------------- @@ -22586,6 +22551,20 @@ datadog\_api\_client.v2.model.security\_monitoring\_suppression\_update\_request :members: :show-inheritance: +datadog\_api\_client.v2.model.security\_monitoring\_suppressions\_meta module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.security_monitoring_suppressions_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.security\_monitoring\_suppressions\_page\_meta module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.security_monitoring_suppressions_page_meta + :members: + :show-inheritance: + datadog\_api\_client.v2.model.security\_monitoring\_suppressions\_response module --------------------------------------------------------------------------------- @@ -24413,27 +24392,6 @@ 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.suppression\_version\_history module ------------------------------------------------------------------ @@ -24504,83 +24462,6 @@ datadog\_api\_client.v2.model.synthetics\_global\_variable\_value module :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\_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.synthetics\_suite\_types module -------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.synthetics_suite_types - :members: - :show-inheritance: - datadog\_api\_client.v2.model.synthetics\_variable\_parser module ----------------------------------------------------------------- diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.py b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.py new file mode 100644 index 0000000000..2c0dabeea2 --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.py @@ -0,0 +1,24 @@ +""" +Get all suppression rules returns "OK" response with sort ascending +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi +from datadog_api_client.v2.model.security_monitoring_suppression_sort import SecurityMonitoringSuppressionSort + +# there is a valid "suppression" in the system +SUPPRESSION_DATA_ID = environ["SUPPRESSION_DATA_ID"] + +# there is a valid "suppression2" in the system +SUPPRESSION2_DATA_ID = environ["SUPPRESSION2_DATA_ID"] + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SecurityMonitoringApi(api_client) + response = api_instance.list_security_monitoring_suppressions( + query="id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", + sort=SecurityMonitoringSuppressionSort.NAME, + ) + + print(response) diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.py b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.py new file mode 100644 index 0000000000..e191bc1787 --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.py @@ -0,0 +1,24 @@ +""" +Get all suppression rules returns "OK" response with sort descending +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi +from datadog_api_client.v2.model.security_monitoring_suppression_sort import SecurityMonitoringSuppressionSort + +# there is a valid "suppression" in the system +SUPPRESSION_DATA_ID = environ["SUPPRESSION_DATA_ID"] + +# there is a valid "suppression2" in the system +SUPPRESSION2_DATA_ID = environ["SUPPRESSION2_DATA_ID"] + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SecurityMonitoringApi(api_client) + response = api_instance.list_security_monitoring_suppressions( + query="id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", + sort=SecurityMonitoringSuppressionSort.NAME_DESCENDING, + ) + + print(response) diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.py b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.py new file mode 100644 index 0000000000..c038f600a5 --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.py @@ -0,0 +1,24 @@ +""" +Get all suppression rules returns "OK" response with pagination +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi + +# there is a valid "suppression" in the system +SUPPRESSION_DATA_ID = environ["SUPPRESSION_DATA_ID"] + +# there is a valid "suppression2" in the system +SUPPRESSION2_DATA_ID = environ["SUPPRESSION2_DATA_ID"] + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SecurityMonitoringApi(api_client) + response = api_instance.list_security_monitoring_suppressions( + query="id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", + page_size=1, + page_number=0, + ) + + print(response) diff --git a/examples/v2/synthetics/CreateSyntheticsSuite.py b/examples/v2/synthetics/CreateSyntheticsSuite.py deleted file mode 100644 index b2b6fe48d5..0000000000 --- a/examples/v2/synthetics/CreateSyntheticsSuite.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -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_type import SyntheticsSuiteType -from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes - -body = SuiteCreateEditRequest( - data=SuiteCreateEdit( - attributes=SyntheticsSuite( - message="Notification message", - name="Example suite name", - options=SyntheticsSuiteOptions(), - tags=[ - "env:production", - ], - tests=[], - type=SyntheticsSuiteType.SUITE, - ), - type=SyntheticsSuiteTypes.SUITES, - ), -) - -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 deleted file mode 100644 index e0967da2f0..0000000000 --- a/examples/v2/synthetics/DeleteSyntheticsSuites.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -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 deleted file mode 100644 index 4a9a5d365a..0000000000 --- a/examples/v2/synthetics/EditSyntheticsSuite.py +++ /dev/null @@ -1,44 +0,0 @@ -""" -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_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.synthetics_suite_types import SyntheticsSuiteTypes - -body = SuiteCreateEditRequest( - data=SuiteCreateEdit( - attributes=SyntheticsSuite( - message="Notification message", - name="Example suite name", - options=SyntheticsSuiteOptions(), - tags=[ - "env:production", - ], - tests=[ - SyntheticsSuiteTest( - alerting_criticality=SyntheticsSuiteTestAlertingCriticality.CRITICAL, - public_id="", - ), - ], - type=SyntheticsSuiteType.SUITE, - ), - type=SyntheticsSuiteTypes.SUITES, - ), -) - -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 deleted file mode 100644 index 25371dfe80..0000000000 --- a/examples/v2/synthetics/GetSyntheticsSuite.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -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 deleted file mode 100644 index 564fdbd3ce..0000000000 --- a/examples/v2/synthetics/SearchSuites.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -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/v1/model/synthetics_global_variable_attributes.py b/src/datadog_api_client/v1/model/synthetics_global_variable_attributes.py index ca3e9512a4..e58f89160e 100644 --- a/src/datadog_api_client/v1/model/synthetics_global_variable_attributes.py +++ b/src/datadog_api_client/v1/model/synthetics_global_variable_attributes.py @@ -34,7 +34,7 @@ def __init__(self_, restricted_roles: Union[SyntheticsRestrictedRoles, UnsetType """ Attributes of the global variable. - :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. **Deprecated**. :type restricted_roles: SyntheticsRestrictedRoles, optional """ if restricted_roles is not unset: diff --git a/src/datadog_api_client/v1/model/synthetics_mobile_test_options.py b/src/datadog_api_client/v1/model/synthetics_mobile_test_options.py index 829fc11726..d869ef4b7d 100644 --- a/src/datadog_api_client/v1/model/synthetics_mobile_test_options.py +++ b/src/datadog_api_client/v1/model/synthetics_mobile_test_options.py @@ -168,7 +168,7 @@ def __init__( :param no_screenshot: A boolean set to not take a screenshot for the step. :type no_screenshot: bool, optional - :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. **Deprecated**. :type restricted_roles: SyntheticsRestrictedRoles, optional :param retry: Object describing the retry strategy to apply to a Synthetic test. diff --git a/src/datadog_api_client/v1/model/synthetics_private_location_metadata.py b/src/datadog_api_client/v1/model/synthetics_private_location_metadata.py index fa49bb1ac0..453cb79da3 100644 --- a/src/datadog_api_client/v1/model/synthetics_private_location_metadata.py +++ b/src/datadog_api_client/v1/model/synthetics_private_location_metadata.py @@ -34,7 +34,7 @@ def __init__(self_, restricted_roles: Union[SyntheticsRestrictedRoles, UnsetType """ Object containing metadata about the private location. - :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. **Deprecated**. :type restricted_roles: SyntheticsRestrictedRoles, optional """ if restricted_roles is not unset: diff --git a/src/datadog_api_client/v1/model/synthetics_restricted_roles.py b/src/datadog_api_client/v1/model/synthetics_restricted_roles.py index 2f107c6e17..22a7642abf 100644 --- a/src/datadog_api_client/v1/model/synthetics_restricted_roles.py +++ b/src/datadog_api_client/v1/model/synthetics_restricted_roles.py @@ -12,7 +12,7 @@ class SyntheticsRestrictedRoles(ModelSimple): """ - A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. :type value: [str] diff --git a/src/datadog_api_client/v1/model/synthetics_test_options.py b/src/datadog_api_client/v1/model/synthetics_test_options.py index abcbf1f0db..2ee4c39d45 100644 --- a/src/datadog_api_client/v1/model/synthetics_test_options.py +++ b/src/datadog_api_client/v1/model/synthetics_test_options.py @@ -204,7 +204,7 @@ def __init__( :param no_screenshot: Prevents saving screenshots of the steps. :type no_screenshot: bool, optional - :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. **Deprecated**. :type restricted_roles: SyntheticsRestrictedRoles, optional :param retry: Object describing the retry strategy to apply to a Synthetic test. diff --git a/src/datadog_api_client/v2/api/security_monitoring_api.py b/src/datadog_api_client/v2/api/security_monitoring_api.py index 5f23e8da82..1905f89201 100644 --- a/src/datadog_api_client/v2/api/security_monitoring_api.py +++ b/src/datadog_api_client/v2/api/security_monitoring_api.py @@ -80,11 +80,15 @@ from datadog_api_client.v2.model.security_filter_response import SecurityFilterResponse from datadog_api_client.v2.model.security_filter_create_request import SecurityFilterCreateRequest from datadog_api_client.v2.model.security_filter_update_request import SecurityFilterUpdateRequest -from datadog_api_client.v2.model.security_monitoring_suppressions_response import SecurityMonitoringSuppressionsResponse +from datadog_api_client.v2.model.security_monitoring_paginated_suppressions_response import ( + SecurityMonitoringPaginatedSuppressionsResponse, +) +from datadog_api_client.v2.model.security_monitoring_suppression_sort import SecurityMonitoringSuppressionSort from datadog_api_client.v2.model.security_monitoring_suppression_response import SecurityMonitoringSuppressionResponse from datadog_api_client.v2.model.security_monitoring_suppression_create_request import ( SecurityMonitoringSuppressionCreateRequest, ) +from datadog_api_client.v2.model.security_monitoring_suppressions_response import SecurityMonitoringSuppressionsResponse from datadog_api_client.v2.model.security_monitoring_rule_create_payload import SecurityMonitoringRuleCreatePayload from datadog_api_client.v2.model.security_monitoring_standard_rule_create_payload import ( SecurityMonitoringStandardRuleCreatePayload, @@ -1763,7 +1767,7 @@ def __init__(self, api_client=None): self._list_security_monitoring_suppressions_endpoint = _Endpoint( settings={ - "response_type": (SecurityMonitoringSuppressionsResponse,), + "response_type": (SecurityMonitoringPaginatedSuppressionsResponse,), "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], "endpoint_path": "/api/v2/security_monitoring/configuration/suppressions", "operation_id": "list_security_monitoring_suppressions", @@ -1776,6 +1780,21 @@ def __init__(self, api_client=None): "attribute": "query", "location": "query", }, + "sort": { + "openapi_types": (SecurityMonitoringSuppressionSort,), + "attribute": "sort", + "location": "query", + }, + "page_size": { + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + "page_number": { + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, }, headers_map={ "accept": ["application/json"], @@ -4335,19 +4354,37 @@ def list_security_monitoring_suppressions( self, *, query: Union[str, UnsetType] = unset, - ) -> SecurityMonitoringSuppressionsResponse: + sort: Union[SecurityMonitoringSuppressionSort, UnsetType] = unset, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + ) -> SecurityMonitoringPaginatedSuppressionsResponse: """Get all suppression rules. Get the list of all suppression rules. :param query: Query string. :type query: str, optional - :rtype: SecurityMonitoringSuppressionsResponse + :param sort: Attribute used to sort the list of suppression rules. Prefix with ``-`` to sort in descending order. + :type sort: SecurityMonitoringSuppressionSort, optional + :param page_size: Size for a given page. Use ``-1`` to return all items. + :type page_size: int, optional + :param page_number: Specific page number to return. + :type page_number: int, optional + :rtype: SecurityMonitoringPaginatedSuppressionsResponse """ kwargs: Dict[str, Any] = {} if query is not unset: kwargs["query"] = query + if sort is not unset: + kwargs["sort"] = sort + + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + return self._list_security_monitoring_suppressions_endpoint.call_with_http_info(**kwargs) def list_threat_hunting_jobs( diff --git a/src/datadog_api_client/v2/api/synthetics_api.py b/src/datadog_api_client/v2/api/synthetics_api.py index f9562aba63..263a5fb12d 100644 --- a/src/datadog_api_client/v2/api/synthetics_api.py +++ b/src/datadog_api_client/v2/api/synthetics_api.py @@ -3,21 +3,12 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict, Union +from typing import Any, Dict 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 from datadog_api_client.v2.model.global_variable_response import GlobalVariableResponse from datadog_api_client.v2.model.global_variable_json_patch_request import GlobalVariableJsonPatchRequest @@ -38,72 +29,6 @@ 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,), @@ -120,29 +45,6 @@ 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._patch_global_variable_endpoint = _Endpoint( settings={ "response_type": (GlobalVariableResponse,), @@ -169,48 +71,6 @@ def __init__(self, api_client=None): 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,), @@ -231,54 +91,6 @@ 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: @@ -291,21 +103,6 @@ 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 patch_global_variable( self, variable_id: str, @@ -336,49 +133,6 @@ def patch_global_variable( return self._patch_global_variable_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 deleted file mode 100644 index 7862047d05..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suite_response_data.py +++ /dev/null @@ -1,66 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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.synthetics_suite_types import SyntheticsSuiteTypes - - -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.synthetics_suite_types import SyntheticsSuiteTypes - - return { - "attributes": (DeletedSuiteResponseDataAttributes,), - "id": (str,), - "type": (SyntheticsSuiteTypes,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, - attributes: Union[DeletedSuiteResponseDataAttributes, UnsetType] = unset, - id: Union[str, UnsetType] = unset, - type: Union[SyntheticsSuiteTypes, UnsetType] = unset, - **kwargs, - ): - """ - - - :param attributes: - :type attributes: DeletedSuiteResponseDataAttributes, optional - - :param id: - :type id: str, optional - - :param type: Type for the Synthetics suites responses, ``suites``. - :type type: SyntheticsSuiteTypes, 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 deleted file mode 100644 index 58dc23ac18..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py +++ /dev/null @@ -1,43 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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_suites_request_delete.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete.py deleted file mode 100644 index ba79c280d4..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suites_request_delete.py +++ /dev/null @@ -1,68 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index d8b88938ae..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py +++ /dev/null @@ -1,43 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index 9e8b5c0345..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index a3aeab6e59..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suites_request_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class 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 deleted file mode 100644 index 637ebf027d..0000000000 --- a/src/datadog_api_client/v2/model/deleted_suites_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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/security_monitoring_paginated_suppressions_response.py b/src/datadog_api_client/v2/model/security_monitoring_paginated_suppressions_response.py new file mode 100644 index 0000000000..6b583d8ed0 --- /dev/null +++ b/src/datadog_api_client/v2/model/security_monitoring_paginated_suppressions_response.py @@ -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. +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.security_monitoring_suppression import SecurityMonitoringSuppression + from datadog_api_client.v2.model.security_monitoring_suppressions_meta import SecurityMonitoringSuppressionsMeta + + +class SecurityMonitoringPaginatedSuppressionsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.security_monitoring_suppression import SecurityMonitoringSuppression + from datadog_api_client.v2.model.security_monitoring_suppressions_meta import SecurityMonitoringSuppressionsMeta + + return { + "data": ([SecurityMonitoringSuppression],), + "meta": (SecurityMonitoringSuppressionsMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, + data: Union[List[SecurityMonitoringSuppression], UnsetType] = unset, + meta: Union[SecurityMonitoringSuppressionsMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response object containing the available suppression rules with pagination metadata. + + :param data: A list of suppressions objects. + :type data: [SecurityMonitoringSuppression], optional + + :param meta: Metadata for the suppression list response. + :type meta: SecurityMonitoringSuppressionsMeta, optional + """ + if data is not unset: + kwargs["data"] = data + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/security_monitoring_suppression_sort.py b/src/datadog_api_client/v2/model/security_monitoring_suppression_sort.py new file mode 100644 index 0000000000..86a162c776 --- /dev/null +++ b/src/datadog_api_client/v2/model/security_monitoring_suppression_sort.py @@ -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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SecurityMonitoringSuppressionSort(ModelSimple): + """ + The sort parameters used for querying suppression rules. + + :param value: Must be one of ["name", "start_date", "expiration_date", "update_date", "enabled", "-name", "-start_date", "-expiration_date", "-update_date", "-enabled"]. + :type value: str + """ + + allowed_values = { + "name", + "start_date", + "expiration_date", + "update_date", + "enabled", + "-name", + "-start_date", + "-expiration_date", + "-update_date", + "-enabled", + } + NAME: ClassVar["SecurityMonitoringSuppressionSort"] + START_DATE: ClassVar["SecurityMonitoringSuppressionSort"] + EXPIRATION_DATE: ClassVar["SecurityMonitoringSuppressionSort"] + UPDATE_DATE: ClassVar["SecurityMonitoringSuppressionSort"] + ENABLED: ClassVar["SecurityMonitoringSuppressionSort"] + NAME_DESCENDING: ClassVar["SecurityMonitoringSuppressionSort"] + START_DATE_DESCENDING: ClassVar["SecurityMonitoringSuppressionSort"] + EXPIRATION_DATE_DESCENDING: ClassVar["SecurityMonitoringSuppressionSort"] + UPDATE_DATE_DESCENDING: ClassVar["SecurityMonitoringSuppressionSort"] + ENABLED_DESCENDING: ClassVar["SecurityMonitoringSuppressionSort"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SecurityMonitoringSuppressionSort.NAME = SecurityMonitoringSuppressionSort("name") +SecurityMonitoringSuppressionSort.START_DATE = SecurityMonitoringSuppressionSort("start_date") +SecurityMonitoringSuppressionSort.EXPIRATION_DATE = SecurityMonitoringSuppressionSort("expiration_date") +SecurityMonitoringSuppressionSort.UPDATE_DATE = SecurityMonitoringSuppressionSort("update_date") +SecurityMonitoringSuppressionSort.ENABLED = SecurityMonitoringSuppressionSort("enabled") +SecurityMonitoringSuppressionSort.NAME_DESCENDING = SecurityMonitoringSuppressionSort("-name") +SecurityMonitoringSuppressionSort.START_DATE_DESCENDING = SecurityMonitoringSuppressionSort("-start_date") +SecurityMonitoringSuppressionSort.EXPIRATION_DATE_DESCENDING = SecurityMonitoringSuppressionSort("-expiration_date") +SecurityMonitoringSuppressionSort.UPDATE_DATE_DESCENDING = SecurityMonitoringSuppressionSort("-update_date") +SecurityMonitoringSuppressionSort.ENABLED_DESCENDING = SecurityMonitoringSuppressionSort("-enabled") diff --git a/src/datadog_api_client/v2/model/security_monitoring_suppressions_meta.py b/src/datadog_api_client/v2/model/security_monitoring_suppressions_meta.py new file mode 100644 index 0000000000..de6b75a34b --- /dev/null +++ b/src/datadog_api_client/v2/model/security_monitoring_suppressions_meta.py @@ -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. +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.security_monitoring_suppressions_page_meta import ( + SecurityMonitoringSuppressionsPageMeta, + ) + + +class SecurityMonitoringSuppressionsMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.security_monitoring_suppressions_page_meta import ( + SecurityMonitoringSuppressionsPageMeta, + ) + + return { + "page": (SecurityMonitoringSuppressionsPageMeta,), + } + + attribute_map = { + "page": "page", + } + + def __init__(self_, page: Union[SecurityMonitoringSuppressionsPageMeta, UnsetType] = unset, **kwargs): + """ + Metadata for the suppression list response. + + :param page: Pagination metadata. + :type page: SecurityMonitoringSuppressionsPageMeta, optional + """ + if page is not unset: + kwargs["page"] = page + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/security_monitoring_suppressions_page_meta.py b/src/datadog_api_client/v2/model/security_monitoring_suppressions_page_meta.py new file mode 100644 index 0000000000..6d769253cc --- /dev/null +++ b/src/datadog_api_client/v2/model/security_monitoring_suppressions_page_meta.py @@ -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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SecurityMonitoringSuppressionsPageMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "page_number": (int,), + "page_size": (int,), + "total_count": (int,), + } + + attribute_map = { + "page_number": "pageNumber", + "page_size": "pageSize", + "total_count": "totalCount", + } + + def __init__( + self_, + page_number: Union[int, UnsetType] = unset, + page_size: Union[int, UnsetType] = unset, + total_count: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Pagination metadata. + + :param page_number: Current page number. + :type page_number: int, optional + + :param page_size: Current page size. + :type page_size: int, optional + + :param total_count: Total count of suppressions. + :type total_count: int, optional + """ + if page_number is not unset: + kwargs["page_number"] = page_number + if page_size is not unset: + kwargs["page_size"] = page_size + if total_count is not unset: + kwargs["total_count"] = total_count + 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 deleted file mode 100644 index 86d2f29a7e..0000000000 --- a/src/datadog_api_client/v2/model/suite_create_edit.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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_types import SyntheticsSuiteTypes - - -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_types import SyntheticsSuiteTypes - - return { - "attributes": (SyntheticsSuite,), - "type": (SyntheticsSuiteTypes,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__(self_, attributes: SyntheticsSuite, type: SyntheticsSuiteTypes, **kwargs): - """ - - - :param attributes: Object containing details about a Synthetic suite. - :type attributes: SyntheticsSuite - - :param type: Type for the Synthetics suites responses, ``suites``. - :type type: SyntheticsSuiteTypes - """ - 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 deleted file mode 100644 index 8ce9a26d0e..0000000000 --- a/src/datadog_api_client/v2/model/suite_create_edit_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index fe5cf1443d..0000000000 --- a/src/datadog_api_client/v2/model/suite_search_response_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class 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_global_variable_attributes.py b/src/datadog_api_client/v2/model/synthetics_global_variable_attributes.py index 00ac9e1f62..8c600f4a48 100644 --- a/src/datadog_api_client/v2/model/synthetics_global_variable_attributes.py +++ b/src/datadog_api_client/v2/model/synthetics_global_variable_attributes.py @@ -28,7 +28,7 @@ def __init__(self_, restricted_roles: Union[List[str], UnsetType] = unset, **kwa """ Attributes of the global variable. - :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + :param restricted_roles: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. **Deprecated**. :type restricted_roles: [str], optional """ if restricted_roles is not unset: diff --git a/src/datadog_api_client/v2/model/synthetics_suite.py b/src/datadog_api_client/v2/model/synthetics_suite.py deleted file mode 100644 index 0c039e58ac..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite.py +++ /dev/null @@ -1,107 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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,), - "monitor_id": (int,), - "name": (str,), - "options": (SyntheticsSuiteOptions,), - "public_id": (str,), - "tags": ([str],), - "tests": ([SyntheticsSuiteTest],), - "type": (SyntheticsSuiteType,), - } - - attribute_map = { - "message": "message", - "monitor_id": "monitor_id", - "name": "name", - "options": "options", - "public_id": "public_id", - "tags": "tags", - "tests": "tests", - "type": "type", - } - read_only_vars = { - "monitor_id", - "public_id", - } - - def __init__( - self_, - name: str, - options: SyntheticsSuiteOptions, - tests: List[SyntheticsSuiteTest], - type: SyntheticsSuiteType, - message: Union[str, UnsetType] = unset, - monitor_id: Union[int, UnsetType] = unset, - public_id: Union[str, UnsetType] = unset, - 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, optional - - :param monitor_id: The associated monitor ID. - :type monitor_id: int, optional - - :param name: Name of the suite. - :type name: str - - :param options: Object describing the extra options for a Synthetic suite. - :type options: SyntheticsSuiteOptions - - :param public_id: The public ID for the test. - :type public_id: str, optional - - :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 message is not unset: - kwargs["message"] = message - if monitor_id is not unset: - kwargs["monitor_id"] = monitor_id - if public_id is not unset: - kwargs["public_id"] = public_id - if tags is not unset: - kwargs["tags"] = tags - super().__init__(kwargs) - - 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 deleted file mode 100644 index b15792e741..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_options.py +++ /dev/null @@ -1,43 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class SyntheticsSuiteOptions(ModelNormal): - validations = { - "alerting_threshold": { - "inclusive_maximum": 1, - "inclusive_minimum": 0, - }, - } - - @cached_property - def openapi_types(_): - return { - "alerting_threshold": (float,), - } - - attribute_map = { - "alerting_threshold": "alerting_threshold", - } - - def __init__(self_, alerting_threshold: Union[float, UnsetType] = unset, **kwargs): - """ - Object describing the extra options for a Synthetic suite. - - :param alerting_threshold: Percentage of critical tests failure needed for a suite to fail. - :type alerting_threshold: float, optional - """ - if alerting_threshold is not unset: - kwargs["alerting_threshold"] = alerting_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 deleted file mode 100644 index 548f00063d..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index c56b6fbfb9..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_response_data.py +++ /dev/null @@ -1,67 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 - from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes - - -class SyntheticsSuiteResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite - from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes - - return { - "attributes": (SyntheticsSuite,), - "id": (str,), - "type": (SyntheticsSuiteTypes,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - read_only_vars = { - "id", - } - - def __init__( - self_, - attributes: Union[SyntheticsSuite, UnsetType] = unset, - id: Union[str, UnsetType] = unset, - type: Union[SyntheticsSuiteTypes, UnsetType] = unset, - **kwargs, - ): - """ - Synthetics suite response data - - :param attributes: Object containing details about a Synthetic suite. - :type attributes: SyntheticsSuite, optional - - :param id: The public ID for the suite. - :type id: str, optional - - :param type: Type for the Synthetics suites responses, ``suites``. - :type type: SyntheticsSuiteTypes, 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.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response.py deleted file mode 100644 index 67340a1f80..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_search_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index ef55ea9895..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_search_response_data.py +++ /dev/null @@ -1,69 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index 1497b85adb..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py +++ /dev/null @@ -1,57 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index aea30d1179..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_test.py +++ /dev/null @@ -1,58 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from 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 deleted file mode 100644 index 5bf3ac8f2e..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py +++ /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. -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 deleted file mode 100644 index 7fa6111014..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class 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/model/synthetics_suite_types.py b/src/datadog_api_client/v2/model/synthetics_suite_types.py deleted file mode 100644 index 10072ed8f4..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_suite_types.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class SyntheticsSuiteTypes(ModelSimple): - """ - Type for the Synthetics suites responses, `suites`. - - :param value: If omitted defaults to "suites". Must be one of ["suites"]. - :type value: str - """ - - allowed_values = { - "suites", - } - SUITES: ClassVar["SyntheticsSuiteTypes"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -SyntheticsSuiteTypes.SUITES = SyntheticsSuiteTypes("suites") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 410de05657..df385e1edd 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1401,13 +1401,6 @@ 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_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 @@ -4412,6 +4405,9 @@ from datadog_api_client.v2.model.security_monitoring_filter import SecurityMonitoringFilter from datadog_api_client.v2.model.security_monitoring_filter_action import SecurityMonitoringFilterAction from datadog_api_client.v2.model.security_monitoring_list_rules_response import SecurityMonitoringListRulesResponse +from datadog_api_client.v2.model.security_monitoring_paginated_suppressions_response import ( + SecurityMonitoringPaginatedSuppressionsResponse, +) from datadog_api_client.v2.model.security_monitoring_reference_table import SecurityMonitoringReferenceTable from datadog_api_client.v2.model.security_monitoring_rule_anomaly_detection_options import ( SecurityMonitoringRuleAnomalyDetectionOptions, @@ -4595,6 +4591,7 @@ SecurityMonitoringSuppressionCreateRequest, ) from datadog_api_client.v2.model.security_monitoring_suppression_response import SecurityMonitoringSuppressionResponse +from datadog_api_client.v2.model.security_monitoring_suppression_sort import SecurityMonitoringSuppressionSort from datadog_api_client.v2.model.security_monitoring_suppression_type import SecurityMonitoringSuppressionType from datadog_api_client.v2.model.security_monitoring_suppression_update_attributes import ( SecurityMonitoringSuppressionUpdateAttributes, @@ -4605,6 +4602,10 @@ from datadog_api_client.v2.model.security_monitoring_suppression_update_request import ( SecurityMonitoringSuppressionUpdateRequest, ) +from datadog_api_client.v2.model.security_monitoring_suppressions_meta import SecurityMonitoringSuppressionsMeta +from datadog_api_client.v2.model.security_monitoring_suppressions_page_meta import ( + SecurityMonitoringSuppressionsPageMeta, +) from datadog_api_client.v2.model.security_monitoring_suppressions_response import SecurityMonitoringSuppressionsResponse from datadog_api_client.v2.model.security_monitoring_third_party_root_query import SecurityMonitoringThirdPartyRootQuery from datadog_api_client.v2.model.security_monitoring_third_party_rule_case import SecurityMonitoringThirdPartyRuleCase @@ -4930,9 +4931,6 @@ 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.suppression_version_history import SuppressionVersionHistory from datadog_api_client.v2.model.suppression_versions import SuppressionVersions from datadog_api_client.v2.model.synthetics_global_variable import SyntheticsGlobalVariable @@ -4949,21 +4947,6 @@ SyntheticsGlobalVariableTOTPParameters, ) from datadog_api_client.v2.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue -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_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.synthetics_suite_types import SyntheticsSuiteTypes from datadog_api_client.v2.model.synthetics_variable_parser import SyntheticsVariableParser from datadog_api_client.v2.model.table_result_v2 import TableResultV2 from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array @@ -6435,13 +6418,6 @@ "DeleteAppsResponse", "DeleteAppsResponseDataItems", "DeleteCustomFrameworkResponse", - "DeletedSuiteResponseData", - "DeletedSuiteResponseDataAttributes", - "DeletedSuitesRequestDelete", - "DeletedSuitesRequestDeleteAttributes", - "DeletedSuitesRequestDeleteRequest", - "DeletedSuitesRequestType", - "DeletedSuitesResponse", "DependencyLocation", "Deployment", "DeploymentAttributes", @@ -8558,6 +8534,7 @@ "SecurityMonitoringFilter", "SecurityMonitoringFilterAction", "SecurityMonitoringListRulesResponse", + "SecurityMonitoringPaginatedSuppressionsResponse", "SecurityMonitoringReferenceTable", "SecurityMonitoringRuleAnomalyDetectionOptions", "SecurityMonitoringRuleAnomalyDetectionOptionsBucketDuration", @@ -8649,10 +8626,13 @@ "SecurityMonitoringSuppressionCreateData", "SecurityMonitoringSuppressionCreateRequest", "SecurityMonitoringSuppressionResponse", + "SecurityMonitoringSuppressionSort", "SecurityMonitoringSuppressionType", "SecurityMonitoringSuppressionUpdateAttributes", "SecurityMonitoringSuppressionUpdateData", "SecurityMonitoringSuppressionUpdateRequest", + "SecurityMonitoringSuppressionsMeta", + "SecurityMonitoringSuppressionsPageMeta", "SecurityMonitoringSuppressionsResponse", "SecurityMonitoringThirdPartyRootQuery", "SecurityMonitoringThirdPartyRuleCase", @@ -8912,9 +8892,6 @@ "Step", "StepDisplay", "StepDisplayBounds", - "SuiteCreateEdit", - "SuiteCreateEditRequest", - "SuiteSearchResponseType", "SuppressionVersionHistory", "SuppressionVersions", "SyntheticsGlobalVariable", @@ -8925,17 +8902,6 @@ "SyntheticsGlobalVariableParserType", "SyntheticsGlobalVariableTOTPParameters", "SyntheticsGlobalVariableValue", - "SyntheticsSuite", - "SyntheticsSuiteOptions", - "SyntheticsSuiteResponse", - "SyntheticsSuiteResponseData", - "SyntheticsSuiteSearchResponse", - "SyntheticsSuiteSearchResponseData", - "SyntheticsSuiteSearchResponseDataAttributes", - "SyntheticsSuiteTest", - "SyntheticsSuiteTestAlertingCriticality", - "SyntheticsSuiteType", - "SyntheticsSuiteTypes", "SyntheticsVariableParser", "TableResultV2", "TableResultV2Array", diff --git a/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.frozen index 3f3e3c99f2..ec35b85885 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-11-07T12:27:26.759Z \ No newline at end of file +2026-01-14T17:29:03.168Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.yaml index a3ce9d669a..28d2d9c6f5 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_a_suppression_rule_returns_ok_response.yaml @@ -1,6 +1,7 @@ interactions: - request: - body: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","enabled":true,"name":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + body: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","enabled":true,"name":"suppression + Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: accept: - application/json @@ -10,8 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions response: body: - string: '{"data":{"id":"uea-lab-big","type":"suppressions","attributes":{"creation_date":1762518447002,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","editable":true,"enabled":true,"name":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447002,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"itm-ljs-0qw","type":"suppressions","attributes":{"creation_date":1768411744411,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","editable":true,"enabled":true,"name":"suppression + Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744411,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: content-type: @@ -25,7 +27,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw response: body: string: '' @@ -39,10 +41,10 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw response: body: - string: '{"errors":["not_found(Suppression with ID uea-lab-big not found)"]}' + string: '{"errors":["not_found(Suppression with ID itm-ljs-0qw not found)"]}' headers: content-type: - application/json diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.frozen index a93a4d20e7..16f1a15edd 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-11-07T12:27:27.654Z \ No newline at end of file +2026-01-14T17:29:04.856Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.yaml index 407dc4e26c..38dd28e4b5 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_a_suppression_rule_returns_ok_response.yaml @@ -1,6 +1,7 @@ interactions: - request: - body: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + body: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","enabled":true,"name":"suppression + Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: accept: - application/json @@ -10,8 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions response: body: - string: '{"data":{"id":"ylq-igi-icg","type":"suppressions","attributes":{"creation_date":1762518447901,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","editable":true,"enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447901,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression + Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: content-type: @@ -25,11 +27,12 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df response: body: - string: '{"data":{"id":"ylq-igi-icg","type":"suppressions","attributes":{"creation_date":1762518447901,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","editable":true,"enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447901,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression + Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: content-type: @@ -43,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.frozen index d0d5ccec31..6691326413 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.frozen @@ -1 +1 @@ -2025-11-26T13:33:06.482Z \ No newline at end of file +2026-01-14T17:29:05.317Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.yaml index 44a5caea94..ec1c652445 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_a_suppressions_version_history_returns_ok_response.yaml @@ -1,6 +1,7 @@ interactions: - request: - body: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","enabled":true,"name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + body: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"name":"suppression + Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: accept: - application/json @@ -10,7 +11,10 @@ interactions: uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions response: body: - string: '{"data":{"id":"456-piv-74h","type":"suppressions","attributes":{"creation_date":1764163986851,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","editable":true,"enabled":true,"name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1764163986851,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"sro-unv-k08","type":"suppressions","attributes":{"creation_date":1768411745430,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression + Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745430,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: content-type: - application/vnd.api+json @@ -23,10 +27,13 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/456-piv-74h/version_history + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08/version_history response: body: - string: '{"data":{"id":"456-piv-74h","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"456-piv-74h","name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"frog@datadoghq.com","name":"frog"},"creation_date":1764163986851,"update_date":1764163986851,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' + string: '{"data":{"id":"sro-unv-k08","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"sro-unv-k08","name":"suppression + Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"creation_date":1768411745430,"update_date":1768411745430,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' headers: content-type: - application/vnd.api+json @@ -39,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/456-piv-74h + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_pagination.frozen b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_pagination.frozen new file mode 100644 index 0000000000..23cdf460db --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_pagination.frozen @@ -0,0 +1 @@ +2026-01-14T17:12:28.523Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_pagination.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_pagination.yaml new file mode 100644 index 0000000000..4d4d98c984 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_pagination.yaml @@ -0,0 +1,87 @@ +interactions: +- request: + body: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions + response: + body: + string: '{"data":{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions + response: + body: + string: '{"data":{"id":"lgh-7no-380","type":"suppressions","attributes":{"creation_date":1768410749324,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410749324,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?page%5Bsize%5D=1&page%5Bnumber%5D=0&query=id%3Afgz-hyr-ibu%20OR%20id%3Algh-7no-380 + response: + body: + string: '{"data":[{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":1,"pageNumber":0}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/lgh-7no-380 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fgz-hyr-ibu + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_ascending.frozen b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_ascending.frozen new file mode 100644 index 0000000000..89bfc8cd8e --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_ascending.frozen @@ -0,0 +1 @@ +2026-01-14T17:12:30.925Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_ascending.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_ascending.yaml new file mode 100644 index 0000000000..285c415343 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_ascending.yaml @@ -0,0 +1,88 @@ +interactions: +- request: + body: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions + response: + body: + string: '{"data":{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions + response: + body: + string: '{"data":{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=name&query=id%3A5cq-vnw-eza%20OR%20id%3Afuu-xxd-kjd + response: + body: + string: '{"data":[{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fuu-xxd-kjd + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/5cq-vnw-eza + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_descending.frozen b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_descending.frozen new file mode 100644 index 0000000000..d184a46ea0 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_descending.frozen @@ -0,0 +1 @@ +2026-01-14T17:12:33.088Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_descending.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_descending.yaml new file mode 100644 index 0000000000..0b935052c1 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_suppression_rules_returns_ok_response_with_sort_descending.yaml @@ -0,0 +1,88 @@ +interactions: +- request: + body: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions + response: + body: + string: '{"data":{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions + response: + body: + string: '{"data":{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=-name&query=id%3Aosw-qyf-tqn%20OR%20id%3Ape9-gdi-ee2 + response: + body: + string: '{"data":[{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 + Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression + Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/pe9-gdi-ee2 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/osw-qyf-tqn + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_search_synthetics_suites_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_search_synthetics_suites_returns_ok_response.frozen deleted file mode 100644 index 768dee23bb..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_search_synthetics_suites_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-07T12:38:44.484Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_search_synthetics_suites_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_search_synthetics_suites_returns_ok_response.yaml deleted file mode 100644 index 6c07ded83c..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_search_synthetics_suites_returns_ok_response.yaml +++ /dev/null @@ -1,79 +0,0 @@ -interactions: -- request: - body: null - headers: - accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/synthetics/suites/search - response: - body: - string: '{"data":{"type":"suites_search","attributes":{"suites":[{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-12T14:36:38.194974+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765550180,"monitor_id":243683630,"tests":[],"notifications":[],"public_id":"q9j-u8p-3v5","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-12T15:13:58.194856+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765552435,"monitor_id":243691225,"tests":[],"notifications":[],"public_id":"qqj-ma8-msw","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-12T13:58:21.265235+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765547882,"monitor_id":243678032,"tests":[],"notifications":[],"public_id":"qwt-zcd-3e7","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-16T21:23:27.482218+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765920189,"monitor_id":244824489,"tests":[],"notifications":[],"public_id":"yya-xnv-r72","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2026-01-06T14:31:13.144659+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1767709878,"monitor_id":248911428,"tests":[],"notifications":[],"public_id":"37x-cfh-hik","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-12T14:52:23.813142+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765551141,"monitor_id":243686361,"tests":[],"notifications":[],"public_id":"y9a-9jy-ng2","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-15T14:02:40.227969+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765807338,"monitor_id":244243608,"tests":[],"notifications":[],"public_id":"45f-82u-p2d","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-15T14:22:09.594574+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765808505,"monitor_id":244250055,"tests":[],"notifications":[],"public_id":"xd9-dws-cm2","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-15T15:36:44.135107+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765813000,"monitor_id":244276690,"tests":[],"notifications":[],"public_id":"77s-9gi-8pa","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-16T09:42:02.245892+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765878101,"monitor_id":244658021,"tests":[],"notifications":[],"public_id":"xft-zns-y58","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-16T09:52:14.327958+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765878721,"monitor_id":244659781,"tests":[],"notifications":[],"public_id":"9ne-jp8-bbs","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-19T09:34:53.578670+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1766136882,"monitor_id":245439882,"tests":[],"notifications":[],"public_id":"rcp-hsx-ksp","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-09T10:37:16.189540+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765276630,"monitor_id":242864230,"tests":[],"notifications":[],"public_id":"ihb-7cb-mbq","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-12T14:58:39.394977+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765551515,"monitor_id":243687635,"tests":[],"notifications":[],"public_id":"m4t-g9e-cht","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-15T13:27:01.650049+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765805206,"monitor_id":244230166,"tests":[],"notifications":[],"public_id":"3rn-xv7-3gw","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-15T13:55:29.070758+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765806925,"monitor_id":244240495,"tests":[],"notifications":[],"public_id":"u5z-r6t-6gj","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-15T15:48:08.393886+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765813664,"monitor_id":244283444,"tests":[],"notifications":[],"public_id":"fug-wqb-jgm","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2025-12-17T08:57:02.235129+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1765961806,"monitor_id":244953226,"tests":[],"notifications":[],"public_id":"tmj-mmm-6rw","tags":["env:production"]},{"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"monitor_status":"No - Data","type":"suite","modified_at":"2026-01-06T13:52:15.675454+00:00","name":"Example - suite name","options":{},"monitor_name":"[Synthetics] Example suite name","last_triggered_ts":1767707530,"monitor_id":248904310,"tests":[],"notifications":[],"public_id":"pkr-4b7-tug","tags":["env:production"]}],"facets":[{"name":"mobile_platform","values":[]},{"name":"test_count","values":[{"name":"0","count":19}]},{"name":"step_count","values":[]},{"name":"http_path","values":[]},{"name":"team","values":[]},{"name":"type","values":[{"name":"suite","count":19}]},{"name":"env","values":[{"name":"production","count":19}]},{"name":"creator","values":[{"name":"CI - Account","count":19}]},{"name":"mobile_application","values":[]},{"name":"notification","values":[]},{"name":"endpoint","values":[]},{"name":"http_method","values":[]},{"name":"creation_source","values":[]},{"name":"domain","values":[]},{"name":"ci_execution_rule","values":[{"name":"blocking","count":19}]},{"name":"tag","values":[{"name":"env:production","count":19}]},{"name":"state","values":[{"name":"paused","count":19}]},{"name":"region","values":[]},{"name":"muted","values":[{"name":"0","count":19}]},{"name":"status","values":[{"name":"No - Data","count":19}]}],"total":19},"id":"74278a23-c9ce-4093-816d-7109fb05adb5"}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_synthetics_create_a_test_suite_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_synthetics_create_a_test_suite_returns_ok_response.frozen deleted file mode 100644 index 62723cd8d2..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_synthetics_create_a_test_suite_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-07T12:38:45.716Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_synthetics_create_a_test_suite_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_synthetics_create_a_test_suite_returns_ok_response.yaml deleted file mode 100644 index d29e21551c..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_synthetics_create_a_test_suite_returns_ok_response.yaml +++ /dev/null @@ -1,47 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"message":"Notification message","name":"Example - suite name","options":{},"tags":["env:production"],"tests":[],"type":"suite"},"type":"suites"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/synthetics/suites - response: - body: - string: '{"data":{"type":"suites","id":"36n-bb6-njj","attributes":{"tags":["env:production"],"type":"suite","created_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"created_at":"2026-01-07T12:38:46.109472+00:00","modified_at":"2026-01-07T12:38:46.109472+00:00","message":"Notification - message","public_id":"36n-bb6-njj","options":{},"modified_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"tests":[],"name":"Example suite name","org_id":321813,"monitor_id":249141773}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: '{"data":{"attributes":{"public_ids":["36n-bb6-njj"]},"type":"delete_suites_request"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/synthetics/suites/bulk-delete - response: - body: - string: '{"data":[{"type":"suites","attributes":{"public_id":"36n-bb6-njj","deleted_at":"2026-01-07 - 12:38:46.679914"},"id":"36n-bb6-njj"}]} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.frozen index 8839a50677..e05f55dd71 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-11-07T12:27:28.613Z \ No newline at end of file +2026-01-14T17:29:05.825Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.yaml index aaa585f339..c25bee2e9c 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_a_suppression_rule_returns_ok_response.yaml @@ -1,6 +1,7 @@ interactions: - request: - body: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + body: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","enabled":true,"name":"suppression + Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: accept: - application/json @@ -10,8 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions response: body: - string: '{"data":{"id":"uqt-hh6-qbq","type":"suppressions","attributes":{"creation_date":1762518448839,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","editable":true,"enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518448839,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression + Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745950,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: content-type: @@ -27,12 +29,13 @@ interactions: content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc response: body: - string: '{"data":{"id":"uqt-hh6-qbq","type":"suppressions","attributes":{"creation_date":1762518448839,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","editable":true,"enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:staging - status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518449150,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression + Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:staging + status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411746111,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":2}}}' headers: content-type: @@ -46,7 +49,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc response: body: string: '' diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index c717223ca7..9d69fd33f2 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -1035,7 +1035,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"{{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" } ], "step": "there is a valid \"suppression\" in the system", @@ -1043,6 +1043,18 @@ "tag": "Security Monitoring", "operationId": "CreateSecurityMonitoringSuppression" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression2 {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" + } + ], + "step": "there is a valid \"suppression2\" in the system", + "key": "suppression2", + "tag": "Security Monitoring", + "operationId": "CreateSecurityMonitoringSuppression" + }, { "parameters": [ { diff --git a/tests/v2/features/security_monitoring.feature b/tests/v2/features/security_monitoring.feature index 2a6c599c30..60e9df68bb 100644 --- a/tests/v2/features/security_monitoring.feature +++ b/tests/v2/features/security_monitoring.feature @@ -1124,6 +1124,40 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @team:DataDog/k9-cloud-security-platform + Scenario: Get all suppression rules returns "OK" response with pagination + Given new "ListSecurityMonitoringSuppressions" request + And there is a valid "suppression" in the system + And there is a valid "suppression2" in the system + And request contains "page[size]" parameter with value 1 + And request contains "page[number]" parameter with value 0 + And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + + @team:DataDog/k9-cloud-security-platform + Scenario: Get all suppression rules returns "OK" response with sort ascending + Given new "ListSecurityMonitoringSuppressions" request + And there is a valid "suppression" in the system + And there is a valid "suppression2" in the system + And request contains "sort" parameter with value "name" + And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "suppression {{ unique }}" + + @team:DataDog/k9-cloud-security-platform + Scenario: Get all suppression rules returns "OK" response with sort descending + Given new "ListSecurityMonitoringSuppressions" request + And there is a valid "suppression" in the system + And there is a valid "suppression2" in the system + And request contains "sort" parameter with value "-name" + And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "suppression2 {{ unique }}" + @skip @team:DataDog/k9-cloud-security-platform Scenario: Get critical assets affecting a specific rule returns "Not Found" response Given new "GetCriticalAssetsAffectingRule" request diff --git a/tests/v2/features/synthetics.feature b/tests/v2/features/synthetics.feature index 5697490c97..133993b11b 100644 --- a/tests/v2/features/synthetics.feature +++ b/tests/v2/features/synthetics.feature @@ -51,73 +51,3 @@ 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. - - @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": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} - When the request is sent - Then the response status is 400 API error response. - - @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": {}, "tags": ["env:production"], "tests": [], "type": "suite"}, "type": "suites"}} - 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": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} - 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": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} - 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 diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index b8cb149622..1cd2195bba 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4646,43 +4646,6 @@ "type": "safe" } }, - "CreateSyntheticsSuite": { - "tag": "Synthetics", - "undo": { - "operationId": "DeleteSyntheticsSuites", - "parameters": [ - { - "name": "body", - "template": "{\"data\": {\"type\": \"delete_suites_request\", \"attributes\": {\"public_ids\": [\"{{ data.attributes.public_id }}\"]}}}" - } - ], - "type": "unsafe" - } - }, - "DeleteSyntheticsSuites": { - "tag": "Synthetics", - "undo": { - "type": "idempotent" - } - }, - "SearchSuites": { - "tag": "Synthetics", - "undo": { - "type": "safe" - } - }, - "GetSyntheticsSuite": { - "tag": "Synthetics", - "undo": { - "type": "safe" - } - }, - "EditSyntheticsSuite": { - "tag": "Synthetics", - "undo": { - "type": "idempotent" - } - }, "PatchGlobalVariable": { "tag": "Synthetics", "undo": {