Sha256: 7209e03bfe9510460fc93953224cbf3bfcb630966729b01c46abffcad2fdd4b1

Contents?: true

Size: 1.05 KB

Versions: 33

Compression:

Stored size: 1.05 KB

Contents

# Create an archive returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::LogsArchivesAPI.new

body = DatadogAPIClient::V2::LogsArchiveCreateRequest.new({
  data: DatadogAPIClient::V2::LogsArchiveCreateRequestDefinition.new({
    attributes: DatadogAPIClient::V2::LogsArchiveCreateRequestAttributes.new({
      destination: DatadogAPIClient::V2::LogsArchiveDestinationAzure.new({
        container: "container-name",
        integration: DatadogAPIClient::V2::LogsArchiveIntegrationAzure.new({
          client_id: "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa",
          tenant_id: "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa",
        }),
        storage_account: "account-name",
        type: DatadogAPIClient::V2::LogsArchiveDestinationAzureType::AZURE,
      }),
      include_tags: false,
      name: "Nginx Archive",
      query: "source:nginx",
      rehydration_max_scan_size_in_gb: 100,
      rehydration_tags: [
        "team:intake",
        "team:app",
      ],
    }),
    type: "archives",
  }),
})
p api_instance.create_logs_archive(body)

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
datadog_api_client-2.8.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.7.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.6.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.5.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.4.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.3.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.2.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.1.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.0.2 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.0.1 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-2.0.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-1.11.0 examples/v2/logs-archives/CreateLogsArchive.rb
datadog_api_client-1.10.0 examples/v2/logs-archives/CreateLogsArchive.rb