Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

LogsArchive

Provides a Datadog Logs Archive API resource, which is used to create and manage Datadog logs archives.

Schema

Required

  • name (String, Required) Your archive name.
  • query (String, Required) The archive query/filter. Logs matching this query are included in the archive.

Optional

  • azure (Map of String, Optional, Deprecated) Definition of an azure archive.
  • azure_archive (Block List, Max: 1) Definition of an azure archive. (see below for nested schema)
  • gcs (Map of String, Optional, Deprecated) Definition of a GCS archive.
  • gcs_archive (Block List, Max: 1) Definition of a GCS archive. (see below for nested schema)
  • id (String, Optional) The ID of this resource.
  • include_tags (Boolean, Optional) To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.
  • rehydration_tags (List of String, Optional) An array of tags to add to rehydrated logs from an archive.
  • s3 (Map of String, Optional, Deprecated) Definition of an s3 archive.
  • s3_archive (Block List, Max: 1) Definition of an s3 archive. (see below for nested schema)

Nested Schema for azure_archive

Required:

  • client_id (String, Required) Your client id.
  • container (String, Required) The container where the archive will be stored.
  • storage_account (String, Required) The associated storage account.
  • tenant_id (String, Required) Your tenant id.

Optional:

  • path (String, Optional) The path where the archive will be stored.

Nested Schema for gcs_archive

Required:

  • bucket (String, Required) Name of your GCS bucket.
  • client_email (String, Required) Your client email.
  • path (String, Required) Path where the archive will be stored.
  • project_id (String, Required) Your project id.

Nested Schema for s3_archive

Required:

  • account_id (String, Required) Your AWS account id.
  • bucket (String, Required) Name of your s3 bucket.
  • path (String, Required) Path where the archive will be stored.
  • role_name (String, Required) Your AWS role name

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var myS3Archive = new Datadog.LogsArchive("myS3Archive", new Datadog.LogsArchiveArgs
        {
            Name = "my s3 archive",
            Query = "service:myservice",
            S3Archive = new Datadog.Inputs.LogsArchiveS3ArchiveArgs
            {
                AccountId = "001234567888",
                Bucket = "my-bucket",
                Path = "/path/foo",
                RoleName = "my-role-name",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-datadog/sdk/v2/go/datadog"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := datadog.NewLogsArchive(ctx, "myS3Archive", &datadog.LogsArchiveArgs{
            Name:  pulumi.String("my s3 archive"),
            Query: pulumi.String("service:myservice"),
            S3Archive: &datadog.LogsArchiveS3ArchiveArgs{
                AccountId: pulumi.String("001234567888"),
                Bucket:    pulumi.String("my-bucket"),
                Path:      pulumi.String("/path/foo"),
                RoleName:  pulumi.String("my-role-name"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_datadog as datadog

my_s3_archive = datadog.LogsArchive("myS3Archive",
    name="my s3 archive",
    query="service:myservice",
    s3_archive=datadog.LogsArchiveS3ArchiveArgs(
        account_id="001234567888",
        bucket="my-bucket",
        path="/path/foo",
        role_name="my-role-name",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const myS3Archive = new datadog.LogsArchive("my_s3_archive", {
    name: "my s3 archive",
    query: "service:myservice",
    s3Archive: {
        accountId: "001234567888",
        bucket: "my-bucket",
        path: "/path/foo",
        roleName: "my-role-name",
    },
});

Create a LogsArchive Resource

new LogsArchive(name: string, args: LogsArchiveArgs, opts?: CustomResourceOptions);
def LogsArchive(resource_name: str, opts: Optional[ResourceOptions] = None, azure: Optional[LogsArchiveAzureArgs] = None, azure_archive: Optional[LogsArchiveAzureArchiveArgs] = None, gcs: Optional[LogsArchiveGcsArgs] = None, gcs_archive: Optional[LogsArchiveGcsArchiveArgs] = None, include_tags: Optional[bool] = None, name: Optional[str] = None, query: Optional[str] = None, rehydration_tags: Optional[Sequence[str]] = None, s3: Optional[LogsArchiveS3Args] = None, s3_archive: Optional[LogsArchiveS3ArchiveArgs] = None)
func NewLogsArchive(ctx *Context, name string, args LogsArchiveArgs, opts ...ResourceOption) (*LogsArchive, error)
public LogsArchive(string name, LogsArchiveArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LogsArchiveArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LogsArchiveArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LogsArchiveArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LogsArchive Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LogsArchive resource accepts the following input properties:

Name string

Your archive name.

Query string

The archive query/filter. Logs matching this query are included in the archive.

Azure LogsArchiveAzureArgs

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

AzureArchive LogsArchiveAzureArchiveArgs

Definition of an azure archive.

Gcs LogsArchiveGcsArgs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

GcsArchive LogsArchiveGcsArchiveArgs

Definition of a GCS archive.

IncludeTags bool

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

RehydrationTags List<string>

An array of tags to add to rehydrated logs from an archive.

S3 LogsArchiveS3Args

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

S3Archive LogsArchiveS3ArchiveArgs

Definition of an s3 archive.

Name string

Your archive name.

Query string

The archive query/filter. Logs matching this query are included in the archive.

Azure LogsArchiveAzure

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

AzureArchive LogsArchiveAzureArchive

Definition of an azure archive.

Gcs LogsArchiveGcs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

GcsArchive LogsArchiveGcsArchive

Definition of a GCS archive.

IncludeTags bool

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

RehydrationTags []string

An array of tags to add to rehydrated logs from an archive.

S3 LogsArchiveS3

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

S3Archive LogsArchiveS3Archive

Definition of an s3 archive.

name string

Your archive name.

query string

The archive query/filter. Logs matching this query are included in the archive.

azure LogsArchiveAzure

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

azureArchive LogsArchiveAzureArchive

Definition of an azure archive.

gcs LogsArchiveGcs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

gcsArchive LogsArchiveGcsArchive

Definition of a GCS archive.

includeTags boolean

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

rehydrationTags string[]

An array of tags to add to rehydrated logs from an archive.

s3 LogsArchiveS3

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

s3Archive LogsArchiveS3Archive

Definition of an s3 archive.

name str

Your archive name.

query str

The archive query/filter. Logs matching this query are included in the archive.

azure LogsArchiveAzureArgs

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

azure_archive LogsArchiveAzureArchiveArgs

Definition of an azure archive.

gcs LogsArchiveGcsArgs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

gcs_archive LogsArchiveGcsArchiveArgs

Definition of a GCS archive.

include_tags bool

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

rehydration_tags Sequence[str]

An array of tags to add to rehydrated logs from an archive.

s3 LogsArchiveS3Args

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

s3_archive LogsArchiveS3ArchiveArgs

Definition of an s3 archive.

Outputs

All input properties are implicitly available as output properties. Additionally, the LogsArchive resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing LogsArchive Resource

Get an existing LogsArchive resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LogsArchiveState, opts?: CustomResourceOptions): LogsArchive
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, azure: Optional[LogsArchiveAzureArgs] = None, azure_archive: Optional[LogsArchiveAzureArchiveArgs] = None, gcs: Optional[LogsArchiveGcsArgs] = None, gcs_archive: Optional[LogsArchiveGcsArchiveArgs] = None, include_tags: Optional[bool] = None, name: Optional[str] = None, query: Optional[str] = None, rehydration_tags: Optional[Sequence[str]] = None, s3: Optional[LogsArchiveS3Args] = None, s3_archive: Optional[LogsArchiveS3ArchiveArgs] = None) -> LogsArchive
func GetLogsArchive(ctx *Context, name string, id IDInput, state *LogsArchiveState, opts ...ResourceOption) (*LogsArchive, error)
public static LogsArchive Get(string name, Input<string> id, LogsArchiveState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Azure LogsArchiveAzureArgs

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

AzureArchive LogsArchiveAzureArchiveArgs

Definition of an azure archive.

Gcs LogsArchiveGcsArgs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

GcsArchive LogsArchiveGcsArchiveArgs

Definition of a GCS archive.

IncludeTags bool

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

Name string

Your archive name.

Query string

The archive query/filter. Logs matching this query are included in the archive.

RehydrationTags List<string>

An array of tags to add to rehydrated logs from an archive.

S3 LogsArchiveS3Args

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

S3Archive LogsArchiveS3ArchiveArgs

Definition of an s3 archive.

Azure LogsArchiveAzure

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

AzureArchive LogsArchiveAzureArchive

Definition of an azure archive.

Gcs LogsArchiveGcs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

GcsArchive LogsArchiveGcsArchive

Definition of a GCS archive.

IncludeTags bool

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

Name string

Your archive name.

Query string

The archive query/filter. Logs matching this query are included in the archive.

RehydrationTags []string

An array of tags to add to rehydrated logs from an archive.

S3 LogsArchiveS3

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

S3Archive LogsArchiveS3Archive

Definition of an s3 archive.

azure LogsArchiveAzure

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

azureArchive LogsArchiveAzureArchive

Definition of an azure archive.

gcs LogsArchiveGcs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

gcsArchive LogsArchiveGcsArchive

Definition of a GCS archive.

includeTags boolean

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

name string

Your archive name.

query string

The archive query/filter. Logs matching this query are included in the archive.

rehydrationTags string[]

An array of tags to add to rehydrated logs from an archive.

s3 LogsArchiveS3

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

s3Archive LogsArchiveS3Archive

Definition of an s3 archive.

azure LogsArchiveAzureArgs

Definition of an azure archive.

Deprecated: Define azure_archive list with one element instead.

azure_archive LogsArchiveAzureArchiveArgs

Definition of an azure archive.

gcs LogsArchiveGcsArgs

Definition of a GCS archive.

Deprecated: Define gcs_archive list with one element instead.

gcs_archive LogsArchiveGcsArchiveArgs

Definition of a GCS archive.

include_tags bool

To store the tags in the archive, set the value true. If it is set to false, the tags will be dropped when the logs are sent to the archive.

name str

Your archive name.

query str

The archive query/filter. Logs matching this query are included in the archive.

rehydration_tags Sequence[str]

An array of tags to add to rehydrated logs from an archive.

s3 LogsArchiveS3Args

Definition of an s3 archive.

Deprecated: Define s3_archive list with one element instead.

s3_archive LogsArchiveS3ArchiveArgs

Definition of an s3 archive.

Supporting Types

LogsArchiveAzure

ClientId string
Container string
StorageAccount string
TenantId string
Path string
ClientId string
Container string
StorageAccount string
TenantId string
Path string
clientId string
container string
storageAccount string
tenantId string
path string

LogsArchiveAzureArchive

ClientId string
Container string
StorageAccount string
TenantId string
Path string
ClientId string
Container string
StorageAccount string
TenantId string
Path string
clientId string
container string
storageAccount string
tenantId string
path string

LogsArchiveGcs

Bucket string
ClientEmail string
Path string
ProjectId string
Bucket string
ClientEmail string
Path string
ProjectId string
bucket string
clientEmail string
path string
projectId string

LogsArchiveGcsArchive

Bucket string
ClientEmail string
Path string
ProjectId string
Bucket string
ClientEmail string
Path string
ProjectId string
bucket string
clientEmail string
path string
projectId string

LogsArchiveS3

AccountId string
Bucket string
Path string
RoleName string
AccountId string
Bucket string
Path string
RoleName string
accountId string
bucket string
path string
roleName string

LogsArchiveS3Archive

AccountId string
Bucket string
Path string
RoleName string
AccountId string
Bucket string
Path string
RoleName string
accountId string
bucket string
path string
roleName string

Import

Import is supported using the following syntax

 $ pulumi import datadog:index/logsArchive:LogsArchive my_s3_archive 1Aabc2_dfQPLnXy3HlfK4hi

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.