datadog.LogsArchiveOrder
Explore with Pulumi AI
Provides a Datadog Logs Archive API resource, which is used to manage Datadog log archives order.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var sampleArchiveOrder = new Datadog.LogsArchiveOrder("sampleArchiveOrder", new()
{
ArchiveIds = new[]
{
datadog_logs_archive.Sample_archive_1.Id,
datadog_logs_archive.Sample_archive_2.Id,
},
});
});
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.NewLogsArchiveOrder(ctx, "sampleArchiveOrder", &datadog.LogsArchiveOrderArgs{
ArchiveIds: pulumi.StringArray{
datadog_logs_archive.Sample_archive_1.Id,
datadog_logs_archive.Sample_archive_2.Id,
},
})
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.LogsArchiveOrder;
import com.pulumi.datadog.LogsArchiveOrderArgs;
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 sampleArchiveOrder = new LogsArchiveOrder("sampleArchiveOrder", LogsArchiveOrderArgs.builder()
.archiveIds(
datadog_logs_archive.sample_archive_1().id(),
datadog_logs_archive.sample_archive_2().id())
.build());
}
}
import pulumi
import pulumi_datadog as datadog
sample_archive_order = datadog.LogsArchiveOrder("sampleArchiveOrder", archive_ids=[
datadog_logs_archive["sample_archive_1"]["id"],
datadog_logs_archive["sample_archive_2"]["id"],
])
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const sampleArchiveOrder = new datadog.LogsArchiveOrder("sampleArchiveOrder", {archiveIds: [
datadog_logs_archive.sample_archive_1.id,
datadog_logs_archive.sample_archive_2.id,
]});
resources:
sampleArchiveOrder:
type: datadog:LogsArchiveOrder
properties:
archiveIds:
- ${datadog_logs_archive.sample_archive_1.id}
- ${datadog_logs_archive.sample_archive_2.id}
Create LogsArchiveOrder Resource
new LogsArchiveOrder(name: string, args?: LogsArchiveOrderArgs, opts?: CustomResourceOptions);
@overload
def LogsArchiveOrder(resource_name: str,
opts: Optional[ResourceOptions] = None,
archive_ids: Optional[Sequence[str]] = None)
@overload
def LogsArchiveOrder(resource_name: str,
args: Optional[LogsArchiveOrderArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewLogsArchiveOrder(ctx *Context, name string, args *LogsArchiveOrderArgs, opts ...ResourceOption) (*LogsArchiveOrder, error)
public LogsArchiveOrder(string name, LogsArchiveOrderArgs? args = null, CustomResourceOptions? opts = null)
public LogsArchiveOrder(String name, LogsArchiveOrderArgs args)
public LogsArchiveOrder(String name, LogsArchiveOrderArgs args, CustomResourceOptions options)
type: datadog:LogsArchiveOrder
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogsArchiveOrderArgs
- 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 LogsArchiveOrderArgs
- 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 LogsArchiveOrderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogsArchiveOrderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogsArchiveOrderArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
LogsArchiveOrder 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 LogsArchiveOrder resource accepts the following input properties:
- Archive
Ids List<string> The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- Archive
Ids []string The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive
Ids List<String> The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive
Ids string[] The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive_
ids Sequence[str] The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive
Ids List<String> The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogsArchiveOrder 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 LogsArchiveOrder Resource
Get an existing LogsArchiveOrder 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?: LogsArchiveOrderState, opts?: CustomResourceOptions): LogsArchiveOrder
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
archive_ids: Optional[Sequence[str]] = None) -> LogsArchiveOrder
func GetLogsArchiveOrder(ctx *Context, name string, id IDInput, state *LogsArchiveOrderState, opts ...ResourceOption) (*LogsArchiveOrder, error)
public static LogsArchiveOrder Get(string name, Input<string> id, LogsArchiveOrderState? state, CustomResourceOptions? opts = null)
public static LogsArchiveOrder get(String name, Output<String> id, LogsArchiveOrderState 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.
- Archive
Ids List<string> The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- Archive
Ids []string The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive
Ids List<String> The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive
Ids string[] The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive_
ids Sequence[str] The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
- archive
Ids List<String> The archive IDs list. The order of archive IDs in this attribute defines the overall archive order for logs. If
archive_ids
is empty or not specified, it will import the actual archive order, and create the resource. Otherwise, it will try to update the order.
Import
There must be at most one datadog_logs_archive_order resource. You can import the datadog_logs_archive_order or create an archive order.
$ pulumi import datadog:index/logsArchiveOrder:LogsArchiveOrder name> archiveOrderID
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
datadog
Terraform Provider.