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_requestsselectnext_page, product, query, status, page_sizeGets a list of data deletion requests based on several filter parameters.
create_data_deletion_requestinsertproduct, dataCreates a data deletion request by providing a query and a timeframe targeting the proper data.
cancel_data_deletion_requestexecidCancels 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. Only logs is supported.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
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 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,
product
)
SELECT
'{{ data }}' /* required */,
'{{ product }}'
RETURNING
data,
meta
;

Lifecycle Methods

EXEC variables use wire (API) names.

Cancels a data deletion request by providing its ID.

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