datadog.LogsArchive
Explore with Pulumi AI
Provides a Datadog Logs Archive API resource, which is used to create and manage Datadog logs archives.
Example Usage
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: {
bucket: "my-bucket",
path: "/path/foo",
accountId: "001234567888",
roleName: "my-role-name",
},
});
import pulumi
import pulumi_datadog as datadog
my_s3_archive = datadog.LogsArchive("my_s3_archive",
name="my s3 archive",
query="service:myservice",
s3_archive={
"bucket": "my-bucket",
"path": "/path/foo",
"account_id": "001234567888",
"role_name": "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, "my_s3_archive", &datadog.LogsArchiveArgs{
Name: pulumi.String("my s3 archive"),
Query: pulumi.String("service:myservice"),
S3Archive: &datadog.LogsArchiveS3ArchiveArgs{
Bucket: pulumi.String("my-bucket"),
Path: pulumi.String("/path/foo"),
AccountId: pulumi.String("001234567888"),
RoleName: pulumi.String("my-role-name"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var myS3Archive = new Datadog.LogsArchive("my_s3_archive", new()
{
Name = "my s3 archive",
Query = "service:myservice",
S3Archive = new Datadog.Inputs.LogsArchiveS3ArchiveArgs
{
Bucket = "my-bucket",
Path = "/path/foo",
AccountId = "001234567888",
RoleName = "my-role-name",
},
});
});
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()
.bucket("my-bucket")
.path("/path/foo")
.accountId("001234567888")
.roleName("my-role-name")
.build())
.build());
}
}
resources:
myS3Archive:
type: datadog:LogsArchive
name: my_s3_archive
properties:
name: my s3 archive
query: service:myservice
s3Archive:
bucket: my-bucket
path: /path/foo
accountId: '001234567888'
roleName: my-role-name
Create LogsArchive Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogsArchive(name: string, args: LogsArchiveArgs, opts?: CustomResourceOptions);
@overload
def LogsArchive(resource_name: str,
args: LogsArchiveArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogsArchive(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
query: Optional[str] = None,
azure_archive: Optional[LogsArchiveAzureArchiveArgs] = None,
gcs_archive: Optional[LogsArchiveGcsArchiveArgs] = None,
include_tags: Optional[bool] = None,
rehydration_max_scan_size_in_gb: Optional[int] = None,
rehydration_tags: Optional[Sequence[str]] = 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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var logsArchiveResource = new Datadog.LogsArchive("logsArchiveResource", new()
{
Name = "string",
Query = "string",
AzureArchive = new Datadog.Inputs.LogsArchiveAzureArchiveArgs
{
ClientId = "string",
Container = "string",
StorageAccount = "string",
TenantId = "string",
Path = "string",
},
GcsArchive = new Datadog.Inputs.LogsArchiveGcsArchiveArgs
{
Bucket = "string",
ClientEmail = "string",
Path = "string",
ProjectId = "string",
},
IncludeTags = false,
RehydrationMaxScanSizeInGb = 0,
RehydrationTags = new[]
{
"string",
},
S3Archive = new Datadog.Inputs.LogsArchiveS3ArchiveArgs
{
AccountId = "string",
Bucket = "string",
RoleName = "string",
Path = "string",
},
});
example, err := datadog.NewLogsArchive(ctx, "logsArchiveResource", &datadog.LogsArchiveArgs{
Name: pulumi.String("string"),
Query: pulumi.String("string"),
AzureArchive: &datadog.LogsArchiveAzureArchiveArgs{
ClientId: pulumi.String("string"),
Container: pulumi.String("string"),
StorageAccount: pulumi.String("string"),
TenantId: pulumi.String("string"),
Path: pulumi.String("string"),
},
GcsArchive: &datadog.LogsArchiveGcsArchiveArgs{
Bucket: pulumi.String("string"),
ClientEmail: pulumi.String("string"),
Path: pulumi.String("string"),
ProjectId: pulumi.String("string"),
},
IncludeTags: pulumi.Bool(false),
RehydrationMaxScanSizeInGb: pulumi.Int(0),
RehydrationTags: pulumi.StringArray{
pulumi.String("string"),
},
S3Archive: &datadog.LogsArchiveS3ArchiveArgs{
AccountId: pulumi.String("string"),
Bucket: pulumi.String("string"),
RoleName: pulumi.String("string"),
Path: pulumi.String("string"),
},
})
var logsArchiveResource = new LogsArchive("logsArchiveResource", LogsArchiveArgs.builder()
.name("string")
.query("string")
.azureArchive(LogsArchiveAzureArchiveArgs.builder()
.clientId("string")
.container("string")
.storageAccount("string")
.tenantId("string")
.path("string")
.build())
.gcsArchive(LogsArchiveGcsArchiveArgs.builder()
.bucket("string")
.clientEmail("string")
.path("string")
.projectId("string")
.build())
.includeTags(false)
.rehydrationMaxScanSizeInGb(0)
.rehydrationTags("string")
.s3Archive(LogsArchiveS3ArchiveArgs.builder()
.accountId("string")
.bucket("string")
.roleName("string")
.path("string")
.build())
.build());
logs_archive_resource = datadog.LogsArchive("logsArchiveResource",
name="string",
query="string",
azure_archive={
"client_id": "string",
"container": "string",
"storage_account": "string",
"tenant_id": "string",
"path": "string",
},
gcs_archive={
"bucket": "string",
"client_email": "string",
"path": "string",
"project_id": "string",
},
include_tags=False,
rehydration_max_scan_size_in_gb=0,
rehydration_tags=["string"],
s3_archive={
"account_id": "string",
"bucket": "string",
"role_name": "string",
"path": "string",
})
const logsArchiveResource = new datadog.LogsArchive("logsArchiveResource", {
name: "string",
query: "string",
azureArchive: {
clientId: "string",
container: "string",
storageAccount: "string",
tenantId: "string",
path: "string",
},
gcsArchive: {
bucket: "string",
clientEmail: "string",
path: "string",
projectId: "string",
},
includeTags: false,
rehydrationMaxScanSizeInGb: 0,
rehydrationTags: ["string"],
s3Archive: {
accountId: "string",
bucket: "string",
roleName: "string",
path: "string",
},
});
type: datadog:LogsArchive
properties:
azureArchive:
clientId: string
container: string
path: string
storageAccount: string
tenantId: string
gcsArchive:
bucket: string
clientEmail: string
path: string
projectId: string
includeTags: false
name: string
query: string
rehydrationMaxScanSizeInGb: 0
rehydrationTags:
- string
s3Archive:
accountId: string
bucket: string
path: string
roleName: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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
Archive LogsArchive Azure Archive - Definition of an azure archive.
- Gcs
Archive LogsArchive Gcs Archive - Definition of a GCS archive.
- bool
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - Rehydration
Max intScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- List<string>
- An array of tags to add to rehydrated logs from an archive.
- S3Archive
Logs
Archive S3Archive - 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
Archive LogsArchive Azure Archive Args - Definition of an azure archive.
- Gcs
Archive LogsArchive Gcs Archive Args - Definition of a GCS archive.
- bool
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - Rehydration
Max intScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- []string
- An array of tags to add to rehydrated logs from an archive.
- S3Archive
Logs
Archive S3Archive Args - 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
Archive LogsArchive Azure Archive - Definition of an azure archive.
- gcs
Archive LogsArchive Gcs Archive - Definition of a GCS archive.
- Boolean
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - rehydration
Max IntegerScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- List<String>
- An array of tags to add to rehydrated logs from an archive.
- s3Archive
Logs
Archive S3Archive - 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
Archive LogsArchive Azure Archive - Definition of an azure archive.
- gcs
Archive LogsArchive Gcs Archive - Definition of a GCS archive.
- boolean
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - rehydration
Max numberScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- string[]
- An array of tags to add to rehydrated logs from an archive.
- s3Archive
Logs
Archive S3Archive - 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 LogsArchive Azure Archive Args - Definition of an azure archive.
- gcs_
archive LogsArchive Gcs Archive Args - Definition of a GCS archive.
- bool
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - rehydration_
max_ intscan_ size_ in_ gb - To limit the rehydration scan size for the archive, set a value in GB.
- Sequence[str]
- An array of tags to add to rehydrated logs from an archive.
- s3_
archive LogsArchive S3Archive Args - 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
Archive Property Map - Definition of an azure archive.
- gcs
Archive Property Map - Definition of a GCS archive.
- Boolean
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - rehydration
Max NumberScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- 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.
- Azure
Archive LogsArchive Azure Archive - Definition of an azure archive.
- Gcs
Archive LogsArchive Gcs Archive - Definition of a GCS archive.
- bool
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - Name string
- Your archive name.
- Query string
- The archive query/filter. Logs matching this query are included in the archive.
- Rehydration
Max intScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- List<string>
- An array of tags to add to rehydrated logs from an archive.
- S3Archive
Logs
Archive S3Archive - Definition of an s3 archive.
- Azure
Archive LogsArchive Azure Archive Args - Definition of an azure archive.
- Gcs
Archive LogsArchive Gcs Archive Args - Definition of a GCS archive.
- bool
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - Name string
- Your archive name.
- Query string
- The archive query/filter. Logs matching this query are included in the archive.
- Rehydration
Max intScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- []string
- An array of tags to add to rehydrated logs from an archive.
- S3Archive
Logs
Archive S3Archive Args - Definition of an s3 archive.
- azure
Archive LogsArchive Azure Archive - Definition of an azure archive.
- gcs
Archive LogsArchive Gcs Archive - Definition of a GCS archive.
- Boolean
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - name String
- Your archive name.
- query String
- The archive query/filter. Logs matching this query are included in the archive.
- rehydration
Max IntegerScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- List<String>
- An array of tags to add to rehydrated logs from an archive.
- s3Archive
Logs
Archive S3Archive - Definition of an s3 archive.
- azure
Archive LogsArchive Azure Archive - Definition of an azure archive.
- gcs
Archive LogsArchive Gcs Archive - Definition of a GCS archive.
- boolean
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - name string
- Your archive name.
- query string
- The archive query/filter. Logs matching this query are included in the archive.
- rehydration
Max numberScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- string[]
- An array of tags to add to rehydrated logs from an archive.
- s3Archive
Logs
Archive S3Archive - Definition of an s3 archive.
- azure_
archive LogsArchive Azure Archive Args - Definition of an azure archive.
- gcs_
archive LogsArchive Gcs Archive Args - Definition of a GCS archive.
- bool
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - name str
- Your archive name.
- query str
- The archive query/filter. Logs matching this query are included in the archive.
- rehydration_
max_ intscan_ size_ in_ gb - To limit the rehydration scan size for the archive, set a value in GB.
- Sequence[str]
- An array of tags to add to rehydrated logs from an archive.
- s3_
archive LogsArchive S3Archive Args - Definition of an s3 archive.
- azure
Archive Property Map - Definition of an azure archive.
- gcs
Archive Property Map - Definition of a GCS archive.
- Boolean
- To store the tags in the archive, set the value
true
. If it is set tofalse
, the tags will be dropped when the logs are sent to the archive. Defaults tofalse
. - name String
- Your archive name.
- query String
- The archive query/filter. Logs matching this query are included in the archive.
- rehydration
Max NumberScan Size In Gb - To limit the rehydration scan size for the archive, set a value in GB.
- 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
- Client
Id string - Your client id.
- Container string
- The container where the archive is stored.
- Storage
Account string - The associated storage account.
- Tenant
Id string - Your tenant id.
- Path string
- The path where the archive is stored.
- Client
Id string - Your client id.
- Container string
- The container where the archive is stored.
- Storage
Account string - The associated storage account.
- Tenant
Id string - Your tenant id.
- Path string
- The path where the archive is stored.
- client
Id String - Your client id.
- container String
- The container where the archive is stored.
- storage
Account String - The associated storage account.
- tenant
Id String - Your tenant id.
- path String
- The path where the archive is stored.
- client
Id string - Your client id.
- container string
- The container where the archive is stored.
- storage
Account string - The associated storage account.
- tenant
Id 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.
- client
Id String - Your client id.
- container String
- The container where the archive is stored.
- storage
Account String - The associated storage account.
- tenant
Id String - Your tenant id.
- path String
- The path where the archive is stored.
LogsArchiveGcsArchive, LogsArchiveGcsArchiveArgs
- Bucket string
- Name of your GCS bucket.
- Client
Email string - Your client email.
- Path string
- Path where the archive is stored.
- Project
Id string - Your project id.
- Bucket string
- Name of your GCS bucket.
- Client
Email string - Your client email.
- Path string
- Path where the archive is stored.
- Project
Id string - Your project id.
- bucket String
- Name of your GCS bucket.
- client
Email String - Your client email.
- path String
- Path where the archive is stored.
- project
Id String - Your project id.
- bucket string
- Name of your GCS bucket.
- client
Email string - Your client email.
- path string
- Path where the archive is stored.
- project
Id string - Your project id.
- bucket str
- Name of your GCS bucket.
- client_
email str - Your client email.
- path str
- Path where the archive is stored.
- project_
id str - Your project id.
- bucket String
- Name of your GCS bucket.
- client
Email String - Your client email.
- path String
- Path where the archive is stored.
- project
Id String - Your project id.
LogsArchiveS3Archive, LogsArchiveS3ArchiveArgs
- 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.
Import
$ pulumi import datadog:index/logsArchive:LogsArchive my_s3_archive 1Aabc2_dfQPLnXy3HlfK4hi
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.