Sha256: 5cfd512cac625d5ff5e90fd7f493348b8c761826be80bfae1cc26739151ad477

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

# Creates a data deletion request returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_data_deletion_request".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DataDeletionAPI.new

body = DatadogAPIClient::V2::CreateDataDeletionRequestBody.new({
  data: DatadogAPIClient::V2::CreateDataDeletionRequestBodyData.new({
    attributes: DatadogAPIClient::V2::CreateDataDeletionRequestBodyAttributes.new({
      from: 1672527600000,
      indexes: [
        "test-index",
        "test-index-2",
      ],
      query: {
        host: "abc", service: "xyz",
      },
      to: 1704063600000,
    }),
  }),
})
p api_instance.create_data_deletion_request("logs", body)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v2/data-deletion/CreateDataDeletionRequest.rb