Skip to content

datadog create-log-archive-azure

Create an archive in your organization

Description

Create an archive in your organization

Synopsis

datadog create-log-archive-azure
    [--site <site>]
    [--include_tags]
    --name <name>
    --query <query>
    [--rehydration_size <rehydration_size>]
    [--rehydration_tags <rehydration_tags>]
    --container <container>
    [--path <path>]
    [--region <region>]
    --client_id <client_id>
    --tenant_id <tenant_id>
    --storage_account <storage_account>

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

include_tags - (bool)

     set "true" to save tags. Else, the tags will be deleted when logs sent to archive
     Example: --include_tags
     Default: false      Attributes: optional

name - (string)

     The archive name
     Example: --name "name-1"
     Default: _None_      Attributes: required

query - (string)

     The archive query/filter. Logs matching this query are included in the archive
     Example: --query "query-1"
     Default: _None_      Attributes: required

rehydration_size - (int)

     Maximum scan size for rehydration in gb from this archive
     Example: --rehydration_size 1
     Default: _None_      Attributes: optional

rehydration_tags - (string)

     An array of tags to add to rehydrated logs from an archive
     Example: --rehydration_tags "rehydration_tags-1"
     Default: _None_      Attributes: optional, multiple allowed

container - (string)

     The container/Bucket where the archive will be stored
     Example: --container "container-1"
     Default: _None_      Attributes: required

path - (string)

     The archive path
     Example: --path "path-1"
     Default: _None_      Attributes: optional

region - (string)

     The Azure region where the archive will be stored
     Example: --region "region-1"
     Default: _None_      Attributes: optional

client_id - (string)

     client ID
     Example: --client_id "client_id-1"
     Default: _None_      Attributes: required

tenant_id - (string)

     tenant ID
     Example: --tenant_id "tenant_id-1"
     Default: _None_      Attributes: required

storage_account - (string)

     associated storage account
     Example: --storage_account "storage_account-1"
     Default: _None_      Attributes: required

Examples

Input:

!datadog create-log-archive-azure --storage_account "testAcc" --tenant_id "aaaa-1a1a-1a1a-aaaa" --client_id "aaaa-1a1a-1a1a-aaaa" --container "Container1" --query "source:nginx" 
Output:
ID                      NAME          QUERY         STATE    DESTINATION-ACCOUNT DESTINATION-CONTAINER  DESTINATION-PATH
a2zcMylnM4OCHpYusxIi3g  Nginx Archive source:nginx  WORKING  testAcc             Container1             /container/a2zcMylnM4OCHpYusxIi3g

Access Control

To use this command, you need access to the following:

Field Value
Action "create"
Service Type "datadog"
Service Instance
Namespace
Object Type "archive"
Object ID

Please see Access Control for details.