datadog.LogsArchiveOrder
Explore with Pulumi AI
Provides a Datadog Logs Archive API resource, which is used to manage Datadog log archives order.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const sampleArchiveOrder = new datadog.LogsArchiveOrder("sample_archive_order", {archiveIds: [
sampleArchive1.id,
sampleArchive2.id,
]});
import pulumi
import pulumi_datadog as datadog
sample_archive_order = datadog.LogsArchiveOrder("sample_archive_order", archive_ids=[
sample_archive1["id"],
sample_archive2["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, "sample_archive_order", &datadog.LogsArchiveOrderArgs{
ArchiveIds: pulumi.StringArray{
sampleArchive1.Id,
sampleArchive2.Id,
},
})
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 sampleArchiveOrder = new Datadog.LogsArchiveOrder("sample_archive_order", new()
{
ArchiveIds = new[]
{
sampleArchive1.Id,
sampleArchive2.Id,
},
});
});
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(
sampleArchive1.id(),
sampleArchive2.id())
.build());
}
}
resources:
sampleArchiveOrder:
type: datadog:LogsArchiveOrder
name: sample_archive_order
properties:
archiveIds:
- ${sampleArchive1.id}
- ${sampleArchive2.id}
Create LogsArchiveOrder Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogsArchiveOrder(name: string, args?: LogsArchiveOrderArgs, opts?: CustomResourceOptions);
@overload
def LogsArchiveOrder(resource_name: str,
args: Optional[LogsArchiveOrderArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def LogsArchiveOrder(resource_name: str,
opts: Optional[ResourceOptions] = None,
archive_ids: Optional[Sequence[str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var logsArchiveOrderResource = new Datadog.LogsArchiveOrder("logsArchiveOrderResource", new()
{
ArchiveIds = new[]
{
"string",
},
});
example, err := datadog.NewLogsArchiveOrder(ctx, "logsArchiveOrderResource", &datadog.LogsArchiveOrderArgs{
ArchiveIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var logsArchiveOrderResource = new LogsArchiveOrder("logsArchiveOrderResource", LogsArchiveOrderArgs.builder()
.archiveIds("string")
.build());
logs_archive_order_resource = datadog.LogsArchiveOrder("logsArchiveOrderResource", archive_ids=["string"])
const logsArchiveOrderResource = new datadog.LogsArchiveOrder("logsArchiveOrderResource", {archiveIds: ["string"]});
type: datadog:LogsArchiveOrder
properties:
archiveIds:
- string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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
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.