1. Packages
  2. Datadog
  3. API Docs
  4. LogsArchive
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

datadog.LogsArchive

Explore with Pulumi AI

datadog logo
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var myS3Archive = new Datadog.LogsArchive("myS3Archive", new()
        {
            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/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/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
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.LogsArchive;
    import com.pulumi.datadog.LogsArchiveArgs;
    import com.pulumi.datadog.inputs.LogsArchiveS3ArchiveArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myS3Archive = new LogsArchive("myS3Archive", LogsArchiveArgs.builder()        
                .name("my s3 archive")
                .query("service:myservice")
                .s3Archive(LogsArchiveS3ArchiveArgs.builder()
                    .accountId("001234567888")
                    .bucket("my-bucket")
                    .path("/path/foo")
                    .roleName("my-role-name")
                    .build())
                .build());
    
        }
    }
    
    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("myS3Archive", {
        name: "my s3 archive",
        query: "service:myservice",
        s3Archive: {
            accountId: "001234567888",
            bucket: "my-bucket",
            path: "/path/foo",
            roleName: "my-role-name",
        },
    });
    
    resources:
      myS3Archive:
        type: datadog:LogsArchive
        properties:
          name: my s3 archive
          query: service:myservice
          s3Archive:
            accountId: '001234567888'
            bucket: my-bucket
            path: /path/foo
            roleName: my-role-name
    

    Create LogsArchive Resource

    new LogsArchive(name: string, args: LogsArchiveArgs, opts?: CustomResourceOptions);
    @overload
    def LogsArchive(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    azure_archive: Optional[LogsArchiveAzureArchiveArgs] = None,
                    gcs_archive: Optional[LogsArchiveGcsArchiveArgs] = None,
                    include_tags: Optional[bool] = None,
                    name: Optional[str] = None,
                    query: Optional[str] = None,
                    rehydration_max_scan_size_in_gb: Optional[int] = None,
                    rehydration_tags: Optional[Sequence[str]] = None,
                    s3_archive: Optional[LogsArchiveS3ArchiveArgs] = None)
    @overload
    def LogsArchive(resource_name: str,
                    args: LogsArchiveArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewLogsArchive(ctx *Context, name string, args LogsArchiveArgs, opts ...ResourceOption) (*LogsArchive, error)
    public LogsArchive(string name, LogsArchiveArgs args, CustomResourceOptions? opts = null)
    public LogsArchive(String name, LogsArchiveArgs args)
    public LogsArchive(String name, LogsArchiveArgs args, CustomResourceOptions options)
    
    type: datadog:LogsArchive
    properties: # The arguments to resource properties.
    options: # 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.
    resource_name str
    The unique name of the resource.
    args LogsArchiveArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args LogsArchiveArgs
    The arguments to resource properties.
    options 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 Architecture and Concepts 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.

    AzureArchive LogsArchiveAzureArchive

    Definition of an azure archive.

    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.

    RehydrationMaxScanSizeInGb int

    To limit the rehydration scan size for the archive, set a value in GB.

    RehydrationTags List<string>

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

    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.

    AzureArchive LogsArchiveAzureArchiveArgs

    Definition of an azure archive.

    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.

    RehydrationMaxScanSizeInGb int

    To limit the rehydration scan size for the archive, set a value in GB.

    RehydrationTags []string

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

    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.

    azureArchive LogsArchiveAzureArchive

    Definition of an azure archive.

    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.

    rehydrationMaxScanSizeInGb Integer

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydrationTags List<String>

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

    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.

    azureArchive LogsArchiveAzureArchive

    Definition of an azure archive.

    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.

    rehydrationMaxScanSizeInGb number

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydrationTags string[]

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

    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_archive LogsArchiveAzureArchiveArgs

    Definition of an azure archive.

    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_max_scan_size_in_gb int

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydration_tags Sequence[str]

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

    s3_archive 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.

    azureArchive Property Map

    Definition of an azure archive.

    gcsArchive Property Map

    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.

    rehydrationMaxScanSizeInGb Number

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydrationTags List<String>

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

    s3Archive Property Map

    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 string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up 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_archive: Optional[LogsArchiveAzureArchiveArgs] = None,
            gcs_archive: Optional[LogsArchiveGcsArchiveArgs] = None,
            include_tags: Optional[bool] = None,
            name: Optional[str] = None,
            query: Optional[str] = None,
            rehydration_max_scan_size_in_gb: Optional[int] = None,
            rehydration_tags: Optional[Sequence[str]] = 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)
    public static LogsArchive get(String name, Output<String> id, LogsArchiveState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    AzureArchive LogsArchiveAzureArchive

    Definition of an azure archive.

    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.

    RehydrationMaxScanSizeInGb int

    To limit the rehydration scan size for the archive, set a value in GB.

    RehydrationTags List<string>

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

    S3Archive LogsArchiveS3Archive

    Definition of an s3 archive.

    AzureArchive LogsArchiveAzureArchiveArgs

    Definition of an azure archive.

    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.

    RehydrationMaxScanSizeInGb int

    To limit the rehydration scan size for the archive, set a value in GB.

    RehydrationTags []string

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

    S3Archive LogsArchiveS3ArchiveArgs

    Definition of an s3 archive.

    azureArchive LogsArchiveAzureArchive

    Definition of an azure archive.

    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.

    rehydrationMaxScanSizeInGb Integer

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydrationTags List<String>

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

    s3Archive LogsArchiveS3Archive

    Definition of an s3 archive.

    azureArchive LogsArchiveAzureArchive

    Definition of an azure archive.

    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.

    rehydrationMaxScanSizeInGb number

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydrationTags string[]

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

    s3Archive LogsArchiveS3Archive

    Definition of an s3 archive.

    azure_archive LogsArchiveAzureArchiveArgs

    Definition of an azure archive.

    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_max_scan_size_in_gb int

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydration_tags Sequence[str]

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

    s3_archive LogsArchiveS3ArchiveArgs

    Definition of an s3 archive.

    azureArchive Property Map

    Definition of an azure archive.

    gcsArchive Property Map

    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.

    rehydrationMaxScanSizeInGb Number

    To limit the rehydration scan size for the archive, set a value in GB.

    rehydrationTags List<String>

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

    s3Archive Property Map

    Definition of an s3 archive.

    Supporting Types

    LogsArchiveAzureArchive, LogsArchiveAzureArchiveArgs

    ClientId string

    Your client id.

    Container string

    The container where the archive is stored.

    StorageAccount string

    The associated storage account.

    TenantId string

    Your tenant id.

    Path string

    The path where the archive is stored.

    ClientId string

    Your client id.

    Container string

    The container where the archive is stored.

    StorageAccount string

    The associated storage account.

    TenantId string

    Your tenant id.

    Path string

    The path where the archive is stored.

    clientId String

    Your client id.

    container String

    The container where the archive is stored.

    storageAccount String

    The associated storage account.

    tenantId String

    Your tenant id.

    path String

    The path where the archive is stored.

    clientId string

    Your client id.

    container string

    The container where the archive is stored.

    storageAccount string

    The associated storage account.

    tenantId string

    Your tenant id.

    path string

    The path where the archive is stored.

    client_id str

    Your client id.

    container str

    The container where the archive is stored.

    storage_account str

    The associated storage account.

    tenant_id str

    Your tenant id.

    path str

    The path where the archive is stored.

    clientId String

    Your client id.

    container String

    The container where the archive is stored.

    storageAccount String

    The associated storage account.

    tenantId String

    Your tenant id.

    path String

    The path where the archive is stored.

    LogsArchiveGcsArchive, LogsArchiveGcsArchiveArgs

    Bucket string

    Name of your GCS bucket.

    ClientEmail string

    Your client email.

    ProjectId string

    Your project id.

    Path string

    Path where the archive is stored.

    Bucket string

    Name of your GCS bucket.

    ClientEmail string

    Your client email.

    ProjectId string

    Your project id.

    Path string

    Path where the archive is stored.

    bucket String

    Name of your GCS bucket.

    clientEmail String

    Your client email.

    projectId String

    Your project id.

    path String

    Path where the archive is stored.

    bucket string

    Name of your GCS bucket.

    clientEmail string

    Your client email.

    projectId string

    Your project id.

    path string

    Path where the archive is stored.

    bucket str

    Name of your GCS bucket.

    client_email str

    Your client email.

    project_id str

    Your project id.

    path str

    Path where the archive is stored.

    bucket String

    Name of your GCS bucket.

    clientEmail String

    Your client email.

    projectId String

    Your project id.

    path String

    Path where the archive is stored.

    LogsArchiveS3Archive, LogsArchiveS3ArchiveArgs

    AccountId string

    Your AWS account id.

    Bucket string

    Name of your s3 bucket.

    RoleName string

    Your AWS role name

    Path string

    Path where the archive is stored.

    AccountId string

    Your AWS account id.

    Bucket string

    Name of your s3 bucket.

    RoleName string

    Your AWS role name

    Path string

    Path where the archive is stored.

    accountId String

    Your AWS account id.

    bucket String

    Name of your s3 bucket.

    roleName String

    Your AWS role name

    path String

    Path where the archive is stored.

    accountId string

    Your AWS account id.

    bucket string

    Name of your s3 bucket.

    roleName string

    Your AWS role name

    path string

    Path where the archive is stored.

    account_id str

    Your AWS account id.

    bucket str

    Name of your s3 bucket.

    role_name str

    Your AWS role name

    path str

    Path where the archive is stored.

    accountId String

    Your AWS account id.

    bucket String

    Name of your s3 bucket.

    roleName String

    Your AWS role name

    path String

    Path where the archive is stored.

    Import

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

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the datadog Terraform Provider.

    datadog logo
    Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi