OssShipper

class OssShipper : KotlinCustomResource

Log service data delivery management, this service provides the function of delivering data in logstore to oss product storage. Refer to details.

NOTE: Available in 1.121.0+ DEPRECATED: This resource has been deprecated from version 1.215.0. Please use new resource alicloud_log_oss_export.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = new random.index.Integer("default", {
max: 99999,
min: 10000,
});
const example = new alicloud.log.Project("example", {
name: `terraform-example-${_default.result}`,
description: "terraform-example",
tags: {
Created: "TF",
For: "example",
},
});
const exampleStore = new alicloud.log.Store("example", {
project: example.name,
name: "example-store",
retentionPeriod: 3650,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: true,
});
const exampleOssShipper = new alicloud.log.OssShipper("example", {
projectName: example.name,
logstoreName: exampleStore.name,
shipperName: "terraform-example",
ossBucket: "example_bucket",
ossPrefix: "root",
bufferInterval: 300,
bufferSize: 250,
compressType: "none",
pathFormat: "%Y/%m/%d/%H/%M",
format: "json",
jsonEnableTag: true,
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = random.index.Integer("default",
max=99999,
min=10000)
example = alicloud.log.Project("example",
name=f"terraform-example-{default['result']}",
description="terraform-example",
tags={
"Created": "TF",
"For": "example",
})
example_store = alicloud.log.Store("example",
project=example.name,
name="example-store",
retention_period=3650,
auto_split=True,
max_split_shard_count=60,
append_meta=True)
example_oss_shipper = alicloud.log.OssShipper("example",
project_name=example.name,
logstore_name=example_store.name,
shipper_name="terraform-example",
oss_bucket="example_bucket",
oss_prefix="root",
buffer_interval=300,
buffer_size=250,
compress_type="none",
path_format="%Y/%m/%d/%H/%M",
format="json",
json_enable_tag=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = new Random.Index.Integer("default", new()
{
Max = 99999,
Min = 10000,
});
var example = new AliCloud.Log.Project("example", new()
{
Name = $"terraform-example-{@default.Result}",
Description = "terraform-example",
Tags =
{
{ "Created", "TF" },
{ "For", "example" },
},
});
var exampleStore = new AliCloud.Log.Store("example", new()
{
Project = example.Name,
Name = "example-store",
RetentionPeriod = 3650,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
var exampleOssShipper = new AliCloud.Log.OssShipper("example", new()
{
ProjectName = example.Name,
LogstoreName = exampleStore.Name,
ShipperName = "terraform-example",
OssBucket = "example_bucket",
OssPrefix = "root",
BufferInterval = 300,
BufferSize = 250,
CompressType = "none",
PathFormat = "%Y/%m/%d/%H/%M",
Format = "json",
JsonEnableTag = true,
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Max: 99999,
Min: 10000,
})
if err != nil {
return err
}
example, err := log.NewProject(ctx, "example", &log.ProjectArgs{
Name: pulumi.Sprintf("terraform-example-%v", _default.Result),
Description: pulumi.String("terraform-example"),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("example"),
},
})
if err != nil {
return err
}
exampleStore, err := log.NewStore(ctx, "example", &log.StoreArgs{
Project: example.Name,
Name: pulumi.String("example-store"),
RetentionPeriod: pulumi.Int(3650),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = log.NewOssShipper(ctx, "example", &log.OssShipperArgs{
ProjectName: example.Name,
LogstoreName: exampleStore.Name,
ShipperName: pulumi.String("terraform-example"),
OssBucket: pulumi.String("example_bucket"),
OssPrefix: pulumi.String("root"),
BufferInterval: pulumi.Int(300),
BufferSize: pulumi.Int(250),
CompressType: pulumi.String("none"),
PathFormat: pulumi.String("%Y/%m/%d/%H/%M"),
Format: pulumi.String("json"),
JsonEnableTag: pulumi.Bool(true),
})
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.random.integer;
import com.pulumi.random.IntegerArgs;
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.OssShipper;
import com.pulumi.alicloud.log.OssShipperArgs;
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 Integer("default", IntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var example = new Project("example", ProjectArgs.builder()
.name(String.format("terraform-example-%s", default_.result()))
.description("terraform-example")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(example.name())
.name("example-store")
.retentionPeriod(3650)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var exampleOssShipper = new OssShipper("exampleOssShipper", OssShipperArgs.builder()
.projectName(example.name())
.logstoreName(exampleStore.name())
.shipperName("terraform-example")
.ossBucket("example_bucket")
.ossPrefix("root")
.bufferInterval(300)
.bufferSize(250)
.compressType("none")
.pathFormat("%Y/%m/%d/%H/%M")
.format("json")
.jsonEnableTag(true)
.build());
}
}
resources:
default:
type: random:integer
properties:
max: 99999
min: 10000
example:
type: alicloud:log:Project
properties:
name: terraform-example-${default.result}
description: terraform-example
tags:
Created: TF
For: example
exampleStore:
type: alicloud:log:Store
name: example
properties:
project: ${example.name}
name: example-store
retentionPeriod: 3650
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
exampleOssShipper:
type: alicloud:log:OssShipper
name: example
properties:
projectName: ${example.name}
logstoreName: ${exampleStore.name}
shipperName: terraform-example
ossBucket: example_bucket
ossPrefix: root
bufferInterval: 300
bufferSize: 250
compressType: none
pathFormat: '%Y/%m/%d/%H/%M'
format: json
jsonEnableTag: true

Import

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

$ pulumi import alicloud:log/ossShipper:OssShipper example tf-log-project:tf-log-logstore:tf-log-shipper

Properties

Link copied to clipboard
val bufferInterval: Output<Int>

How often is it delivered every interval.

Link copied to clipboard
val bufferSize: Output<Int>

Automatically control the creation interval of delivery tasks and set the upper limit of an OSS object size (calculated in uncompressed), unit: MB.

Link copied to clipboard
val compressType: Output<String>?

OSS data storage compression method, support: none, snappy. Among them, none means that the original data is not compressed, and snappy means that the data is compressed using the snappy algorithm, which can reduce the storage space usage of the OSS Bucket.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val csvConfigHeader: Output<Boolean>?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val csvConfigQuote: Output<String>?
Link copied to clipboard
val format: Output<String>

Storage format, only supports three types: json, parquet, csv. According to the different format, please select the following parameters

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val jsonEnableTag: Output<Boolean>?
Link copied to clipboard
val logstoreName: Output<String>

The name of the log logstore.

Link copied to clipboard
val ossBucket: Output<String>

The name of the oss bucket.

Link copied to clipboard
val ossPrefix: Output<String>?

The data synchronized from Log Service to OSS will be stored in this directory of Bucket.

Link copied to clipboard
Link copied to clipboard
val pathFormat: Output<String>

The OSS Bucket directory is dynamically generated according to the creation time of the shipper task, it cannot start with a forward slash /, the default value is %Y/%m/%d/%H/%M.

Link copied to clipboard
val projectName: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleArn: Output<String>?

Used for access control, the OSS Bucket owner creates the role mark, such as acs:ram::13234:role/logrole

Link copied to clipboard
val shipperName: Output<String>

Delivery configuration 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 urn: Output<String>