Skip to main content

data_deletion_requests

Creates, updates, deletes, gets or lists a data_deletion_requests resource.

Overview

Namedata_deletion_requests
TypeResource
Iddatadog.organization.data_deletion_requests

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the created data deletion request. (example: 1)
attributesobjectDeletion attribute for data deletion response.
typestringThe type of the request created. (example: deletion_request)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_data_deletion_requestsselectregionnext_page, product, query, status, page_sizeGets a list of data deletion requests based on several filter parameters.
create_data_deletion_requestinsertproduct, region, data__dataCreates a data deletion request by providing a query and a timeframe targeting the proper data.
cancel_data_deletion_requestexecid, regionCancels a data deletion request by providing its ID.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringID of the deletion request.
productstringName of the product to be deleted, either logs or rum.
regionstring(default: datadoghq.com)
next_pagestringThe next page of the previous search. If the next_page parameter is included, the rest of the query elements are ignored. (example: cGFnZTI=)
page_sizeinteger (int64)Sets the page size of the search. (example: 50)
productstringRetrieve only the requests related to the given product. (example: logs)
querystringRetrieve only the requests that matches the given query. (example: service:xyz host:abc)
statusstringRetrieve only the requests with the given status. (example: pending)

SELECT examples

Gets a list of data deletion requests based on several filter parameters.

SELECT
id,
attributes,
type
FROM datadog.organization.data_deletion_requests
WHERE region = '{{ region }}' -- required
AND next_page = '{{ next_page }}'
AND product = '{{ product }}'
AND query = '{{ query }}'
AND status = '{{ status }}'
AND page_size = '{{ page_size }}'
;

INSERT examples

Creates a data deletion request by providing a query and a timeframe targeting the proper data.

INSERT INTO datadog.organization.data_deletion_requests (
data__data,
product,
region
)
SELECT
'{{ data }}' /* required */,
'{{ product }}',
'{{ region }}'
RETURNING
data,
meta
;

Lifecycle Methods

Cancels a data deletion request by providing its ID.

EXEC datadog.organization.data_deletion_requests.cancel_data_deletion_request 
@id='{{ id }}' --required,
@region='{{ region }}' --required
;