IngestionArgs

data class IngestionArgs(val description: Output<String>? = null, val displayName: Output<String>? = null, val ingestionName: Output<String>? = null, val interval: Output<String>? = null, val logstore: Output<String>? = null, val project: Output<String>? = null, val runImmediately: Output<Boolean>? = null, val source: Output<String>? = null, val timeZone: Output<String>? = null) : ConvertibleToJava<IngestionArgs>

Log service ingestion, this service provides the function of importing logs of various data sources(OSS, MaxCompute) into logstore. Refer to details.

NOTE: Available in 1.161.0+

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.Ingestion;
import com.pulumi.alicloud.log.IngestionArgs;
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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("terraform-example")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.retentionPeriod(3650)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var exampleIngestion = new Ingestion("exampleIngestion", IngestionArgs.builder()
.project(exampleProject.name())
.logstore(exampleStore.name())
.ingestionName("terraform-example")
.displayName("terraform-example")
.description("terraform-example")
.interval("30m")
.runImmediately(true)
.timeZone("+0800")
.source("""
{
"bucket": "bucket_name",
"compressionCodec": "none",
"encoding": "UTF-8",
"endpoint": "oss-cn-hangzhou-internal.aliyuncs.com",
"format": {
"escapeChar": "\\",
"fieldDelimiter": ",",
"fieldNames": [],
"firstRowAsHeader": true,
"maxLines": 1,
"quoteChar": "\"",
"skipLeadingRows": 0,
"timeField": "",
"type": "DelimitedText"
},
"pattern": "",
"prefix": "test-prefix/",
"restoreObjectEnabled": false,
"roleARN": "acs:ram::1049446484210612:role/aliyunlogimportossrole",
"type": "AliyunOSS"
}
""")
.build());
}
}

Import

Log ingestion can be imported using the id or name, e.g.

$ pulumi import alicloud:log/ingestion:Ingestion example tf-log-project:tf-log-logstore:ingestion_name

Constructors

Link copied to clipboard
fun IngestionArgs(description: Output<String>? = null, displayName: Output<String>? = null, ingestionName: Output<String>? = null, interval: Output<String>? = null, logstore: Output<String>? = null, project: Output<String>? = null, runImmediately: Output<Boolean>? = null, source: Output<String>? = null, timeZone: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): IngestionArgs

Properties

Link copied to clipboard
val description: Output<String>? = null

Ingestion job description.

Link copied to clipboard
val displayName: Output<String>? = null

The name displayed on the web page.

Link copied to clipboard
val ingestionName: Output<String>? = null

Ingestion job name, it can only contain lowercase letters, numbers, dashes - and underscores _. It must start and end with lowercase letters or numbers, and the name must be 2 to 128 characters long.

Link copied to clipboard
val interval: Output<String>? = null

Task execution interval, support minute m, hour h, day d, for example 30 minutes 30m.

Link copied to clipboard
val logstore: Output<String>? = null

The name of the target logstore.

Link copied to clipboard
val project: Output<String>? = null

The name of the log project. It is the only in one Alicloud account.

Link copied to clipboard
val runImmediately: Output<Boolean>? = null

Whether to run the ingestion job immediately, if false, wait for an interval before starting the ingestion.

Link copied to clipboard
val source: Output<String>? = null

Data source and data format details. Refer to details.

Link copied to clipboard
val timeZone: Output<String>? = null

Which time zone is the log time imported in, e.g. +0800.