alicloud.log.Store
Explore with Pulumi AI
Provides a SLS Log Store resource.
For information about SLS Log Store and how to use it, see What is Log Store.
NOTE: Available since v1.0.0.
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",
});
const exampleStore = new alicloud.log.Store("example", {
project: example.name,
name: "example-store",
shardCount: 3,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: 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")
example_store = alicloud.log.Store("example",
project=example.name,
name="example-store",
shard_count=3,
auto_split=True,
max_split_shard_count=60,
append_meta=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 {
_, 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.String(fmt.Sprintf("terraform-example-%v", _default.Result)),
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
_, err = log.NewStore(ctx, "example", &log.StoreArgs{
Project: example.Name,
Name: pulumi.String("example-store"),
ShardCount: pulumi.Int(3),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
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",
});
var exampleStore = new AliCloud.Log.Store("example", new()
{
Project = example.Name,
Name = "example-store",
ShardCount = 3,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
});
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 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")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(example.name())
.name("example-store")
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(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
exampleStore:
type: alicloud:log:Store
name: example
properties:
project: ${example.name}
name: example-store
shardCount: 3
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
Encrypt Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
// The region of kms key.
const region = config.get("region") || "cn-hangzhou";
const example = alicloud.getAccount({});
const _default = new random.index.Integer("default", {
max: 99999,
min: 10000,
});
const exampleKey = new alicloud.kms.Key("example", {
description: "terraform-example",
pendingWindowInDays: 7,
status: "Enabled",
});
const exampleProject = new alicloud.log.Project("example", {
name: `terraform-example-${_default.result}`,
description: "terraform-example",
});
const exampleStore = new alicloud.log.Store("example", {
project: exampleProject.name,
name: "example-store",
shardCount: 1,
autoSplit: true,
maxSplitShardCount: 60,
encryptConf: {
enable: true,
encryptType: "default",
userCmkInfo: {
cmkKeyId: exampleKey.id,
arn: example.then(example => `acs:ram::${example.id}:role/aliyunlogdefaultrole`),
regionId: region,
},
},
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
# The region of kms key.
region = config.get("region")
if region is None:
region = "cn-hangzhou"
example = alicloud.get_account()
default = random.index.Integer("default",
max=99999,
min=10000)
example_key = alicloud.kms.Key("example",
description="terraform-example",
pending_window_in_days=7,
status="Enabled")
example_project = alicloud.log.Project("example",
name=f"terraform-example-{default['result']}",
description="terraform-example")
example_store = alicloud.log.Store("example",
project=example_project.name,
name="example-store",
shard_count=1,
auto_split=True,
max_split_shard_count=60,
encrypt_conf=alicloud.log.StoreEncryptConfArgs(
enable=True,
encrypt_type="default",
user_cmk_info=alicloud.log.StoreEncryptConfUserCmkInfoArgs(
cmk_key_id=example_key.id,
arn=f"acs:ram::{example.id}:role/aliyunlogdefaultrole",
region_id=region,
),
))
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
"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"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
// The region of kms key.
region := "cn-hangzhou"
if param := cfg.Get("region"); param != "" {
region = param
}
example, err := alicloud.GetAccount(ctx, nil, nil)
if err != nil {
return err
}
_, err = random.NewInteger(ctx, "default", &random.IntegerArgs{
Max: 99999,
Min: 10000,
})
if err != nil {
return err
}
exampleKey, err := kms.NewKey(ctx, "example", &kms.KeyArgs{
Description: pulumi.String("terraform-example"),
PendingWindowInDays: pulumi.Int(7),
Status: pulumi.String("Enabled"),
})
if err != nil {
return err
}
exampleProject, err := log.NewProject(ctx, "example", &log.ProjectArgs{
Name: pulumi.String(fmt.Sprintf("terraform-example-%v", _default.Result)),
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
_, err = log.NewStore(ctx, "example", &log.StoreArgs{
Project: exampleProject.Name,
Name: pulumi.String("example-store"),
ShardCount: pulumi.Int(1),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
EncryptConf: &log.StoreEncryptConfArgs{
Enable: pulumi.Bool(true),
EncryptType: pulumi.String("default"),
UserCmkInfo: &log.StoreEncryptConfUserCmkInfoArgs{
CmkKeyId: exampleKey.ID(),
Arn: pulumi.String(fmt.Sprintf("acs:ram::%v:role/aliyunlogdefaultrole", example.Id)),
RegionId: pulumi.String(region),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
// The region of kms key.
var region = config.Get("region") ?? "cn-hangzhou";
var example = AliCloud.GetAccount.Invoke();
var @default = new Random.Index.Integer("default", new()
{
Max = 99999,
Min = 10000,
});
var exampleKey = new AliCloud.Kms.Key("example", new()
{
Description = "terraform-example",
PendingWindowInDays = 7,
Status = "Enabled",
});
var exampleProject = new AliCloud.Log.Project("example", new()
{
Name = $"terraform-example-{@default.Result}",
Description = "terraform-example",
});
var exampleStore = new AliCloud.Log.Store("example", new()
{
Project = exampleProject.Name,
Name = "example-store",
ShardCount = 1,
AutoSplit = true,
MaxSplitShardCount = 60,
EncryptConf = new AliCloud.Log.Inputs.StoreEncryptConfArgs
{
Enable = true,
EncryptType = "default",
UserCmkInfo = new AliCloud.Log.Inputs.StoreEncryptConfUserCmkInfoArgs
{
CmkKeyId = exampleKey.Id,
Arn = $"acs:ram::{example.Apply(getAccountResult => getAccountResult.Id)}:role/aliyunlogdefaultrole",
RegionId = region,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.kms.Key;
import com.pulumi.alicloud.kms.KeyArgs;
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.inputs.StoreEncryptConfArgs;
import com.pulumi.alicloud.log.inputs.StoreEncryptConfUserCmkInfoArgs;
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) {
final var config = ctx.config();
final var region = config.get("region").orElse("cn-hangzhou");
final var example = AlicloudFunctions.getAccount();
var default_ = new Integer("default", IntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleKey = new Key("exampleKey", KeyArgs.builder()
.description("terraform-example")
.pendingWindowInDays("7")
.status("Enabled")
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.name(String.format("terraform-example-%s", default_.result()))
.description("terraform-example")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.name("example-store")
.shardCount(1)
.autoSplit(true)
.maxSplitShardCount(60)
.encryptConf(StoreEncryptConfArgs.builder()
.enable(true)
.encryptType("default")
.userCmkInfo(StoreEncryptConfUserCmkInfoArgs.builder()
.cmkKeyId(exampleKey.id())
.arn(String.format("acs:ram::%s:role/aliyunlogdefaultrole", example.applyValue(getAccountResult -> getAccountResult.id())))
.regionId(region)
.build())
.build())
.build());
}
}
configuration:
region:
type: string
default: cn-hangzhou
resources:
default:
type: random:integer
properties:
max: 99999
min: 10000
exampleKey:
type: alicloud:kms:Key
name: example
properties:
description: terraform-example
pendingWindowInDays: '7'
status: Enabled
exampleProject:
type: alicloud:log:Project
name: example
properties:
name: terraform-example-${default.result}
description: terraform-example
exampleStore:
type: alicloud:log:Store
name: example
properties:
project: ${exampleProject.name}
name: example-store
shardCount: 1
autoSplit: true
maxSplitShardCount: 60
encryptConf:
enable: true
encryptType: default
userCmkInfo:
cmkKeyId: ${exampleKey.id}
arn: acs:ram::${example.id}:role/aliyunlogdefaultrole
regionId: ${region}
variables:
example:
fn::invoke:
Function: alicloud:getAccount
Arguments: {}
Module Support
You can use the existing sls module to create SLS project, store and store index one-click, like ECS instances.
Create Store Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Store(name: string, args?: StoreArgs, opts?: CustomResourceOptions);
@overload
def Store(resource_name: str,
args: Optional[StoreArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Store(resource_name: str,
opts: Optional[ResourceOptions] = None,
append_meta: Optional[bool] = None,
auto_split: Optional[bool] = None,
enable_web_tracking: Optional[bool] = None,
encrypt_conf: Optional[StoreEncryptConfArgs] = None,
hot_ttl: Optional[int] = None,
logstore_name: Optional[str] = None,
max_split_shard_count: Optional[int] = None,
metering_mode: Optional[str] = None,
mode: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
project_name: Optional[str] = None,
retention_period: Optional[int] = None,
shard_count: Optional[int] = None,
telemetry_type: Optional[str] = None)
func NewStore(ctx *Context, name string, args *StoreArgs, opts ...ResourceOption) (*Store, error)
public Store(string name, StoreArgs? args = null, CustomResourceOptions? opts = null)
type: alicloud:log:Store
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 StoreArgs
- 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 StoreArgs
- 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 StoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StoreArgs
- 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 storeResource = new AliCloud.Log.Store("storeResource", new()
{
AppendMeta = false,
AutoSplit = false,
EnableWebTracking = false,
EncryptConf = new AliCloud.Log.Inputs.StoreEncryptConfArgs
{
Enable = false,
EncryptType = "string",
UserCmkInfo = new AliCloud.Log.Inputs.StoreEncryptConfUserCmkInfoArgs
{
Arn = "string",
CmkKeyId = "string",
RegionId = "string",
},
},
HotTtl = 0,
LogstoreName = "string",
MaxSplitShardCount = 0,
MeteringMode = "string",
Mode = "string",
ProjectName = "string",
RetentionPeriod = 0,
ShardCount = 0,
TelemetryType = "string",
});
example, err := log.NewStore(ctx, "storeResource", &log.StoreArgs{
AppendMeta: pulumi.Bool(false),
AutoSplit: pulumi.Bool(false),
EnableWebTracking: pulumi.Bool(false),
EncryptConf: &log.StoreEncryptConfArgs{
Enable: pulumi.Bool(false),
EncryptType: pulumi.String("string"),
UserCmkInfo: &log.StoreEncryptConfUserCmkInfoArgs{
Arn: pulumi.String("string"),
CmkKeyId: pulumi.String("string"),
RegionId: pulumi.String("string"),
},
},
HotTtl: pulumi.Int(0),
LogstoreName: pulumi.String("string"),
MaxSplitShardCount: pulumi.Int(0),
MeteringMode: pulumi.String("string"),
Mode: pulumi.String("string"),
ProjectName: pulumi.String("string"),
RetentionPeriod: pulumi.Int(0),
ShardCount: pulumi.Int(0),
TelemetryType: pulumi.String("string"),
})
var storeResource = new Store("storeResource", StoreArgs.builder()
.appendMeta(false)
.autoSplit(false)
.enableWebTracking(false)
.encryptConf(StoreEncryptConfArgs.builder()
.enable(false)
.encryptType("string")
.userCmkInfo(StoreEncryptConfUserCmkInfoArgs.builder()
.arn("string")
.cmkKeyId("string")
.regionId("string")
.build())
.build())
.hotTtl(0)
.logstoreName("string")
.maxSplitShardCount(0)
.meteringMode("string")
.mode("string")
.projectName("string")
.retentionPeriod(0)
.shardCount(0)
.telemetryType("string")
.build());
store_resource = alicloud.log.Store("storeResource",
append_meta=False,
auto_split=False,
enable_web_tracking=False,
encrypt_conf=alicloud.log.StoreEncryptConfArgs(
enable=False,
encrypt_type="string",
user_cmk_info=alicloud.log.StoreEncryptConfUserCmkInfoArgs(
arn="string",
cmk_key_id="string",
region_id="string",
),
),
hot_ttl=0,
logstore_name="string",
max_split_shard_count=0,
metering_mode="string",
mode="string",
project_name="string",
retention_period=0,
shard_count=0,
telemetry_type="string")
const storeResource = new alicloud.log.Store("storeResource", {
appendMeta: false,
autoSplit: false,
enableWebTracking: false,
encryptConf: {
enable: false,
encryptType: "string",
userCmkInfo: {
arn: "string",
cmkKeyId: "string",
regionId: "string",
},
},
hotTtl: 0,
logstoreName: "string",
maxSplitShardCount: 0,
meteringMode: "string",
mode: "string",
projectName: "string",
retentionPeriod: 0,
shardCount: 0,
telemetryType: "string",
});
type: alicloud:log:Store
properties:
appendMeta: false
autoSplit: false
enableWebTracking: false
encryptConf:
enable: false
encryptType: string
userCmkInfo:
arn: string
cmkKeyId: string
regionId: string
hotTtl: 0
logstoreName: string
maxSplitShardCount: 0
meteringMode: string
mode: string
projectName: string
retentionPeriod: 0
shardCount: 0
telemetryType: string
Store 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 Store resource accepts the following input properties:
- Append
Meta bool - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - Auto
Split bool - Determines whether to automatically split a shard. Default to
false
. - Enable
Web boolTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- Encrypt
Conf Pulumi.Ali Cloud. Log. Inputs. Store Encrypt Conf - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - Hot
Ttl int - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- Logstore
Name string - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - Max
Split intShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- Metering
Mode string - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- Mode string
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - Name string
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- Project string
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- Project
Name string - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - Retention
Period int - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- int
- The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- Telemetry
Type string Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- Append
Meta bool - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - Auto
Split bool - Determines whether to automatically split a shard. Default to
false
. - Enable
Web boolTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- Encrypt
Conf StoreEncrypt Conf Args - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - Hot
Ttl int - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- Logstore
Name string - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - Max
Split intShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- Metering
Mode string - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- Mode string
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - Name string
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- Project string
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- Project
Name string - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - Retention
Period int - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- int
- The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- Telemetry
Type string Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append
Meta Boolean - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto
Split Boolean - Determines whether to automatically split a shard. Default to
false
. - enable
Web BooleanTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt
Conf StoreEncrypt Conf - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot
Ttl Integer - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore
Name String - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max
Split IntegerShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering
Mode String - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode String
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name String
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project String
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project
Name String - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention
Period Integer - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- Integer
- The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- telemetry
Type String Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append
Meta boolean - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto
Split boolean - Determines whether to automatically split a shard. Default to
false
. - enable
Web booleanTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt
Conf StoreEncrypt Conf - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot
Ttl number - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore
Name string - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max
Split numberShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering
Mode string - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode string
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name string
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project string
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project
Name string - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention
Period number - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- number
- The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- telemetry
Type string Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append_
meta bool - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto_
split bool - Determines whether to automatically split a shard. Default to
false
. - enable_
web_ booltracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt_
conf StoreEncrypt Conf Args - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot_
ttl int - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore_
name str - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max_
split_ intshard_ count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering_
mode str - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode str
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name str
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project str
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project_
name str - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention_
period int - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- int
- The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- telemetry_
type str Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append
Meta Boolean - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto
Split Boolean - Determines whether to automatically split a shard. Default to
false
. - enable
Web BooleanTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt
Conf Property Map - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot
Ttl Number - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore
Name String - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max
Split NumberShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering
Mode String - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode String
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name String
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project String
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project
Name String - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention
Period Number - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- Number
- The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- telemetry
Type String Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
Outputs
All input properties are implicitly available as output properties. Additionally, the Store resource produces the following output properties:
- Create
Time int - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- Id string
- The provider-assigned unique ID for this managed resource.
- List<Pulumi.
Ali Cloud. Log. Outputs. Store Shard> - The shard attribute.
- Create
Time int - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- Id string
- The provider-assigned unique ID for this managed resource.
- []Store
Shard - The shard attribute.
- create
Time Integer - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- id String
- The provider-assigned unique ID for this managed resource.
- List<Store
Shard> - The shard attribute.
- create
Time number - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- id string
- The provider-assigned unique ID for this managed resource.
- Store
Shard[] - The shard attribute.
- create_
time int - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- id str
- The provider-assigned unique ID for this managed resource.
- Sequence[Store
Shard] - The shard attribute.
- create
Time Number - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- id String
- The provider-assigned unique ID for this managed resource.
- List<Property Map>
- The shard attribute.
Look up Existing Store Resource
Get an existing Store 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?: StoreState, opts?: CustomResourceOptions): Store
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
append_meta: Optional[bool] = None,
auto_split: Optional[bool] = None,
create_time: Optional[int] = None,
enable_web_tracking: Optional[bool] = None,
encrypt_conf: Optional[StoreEncryptConfArgs] = None,
hot_ttl: Optional[int] = None,
logstore_name: Optional[str] = None,
max_split_shard_count: Optional[int] = None,
metering_mode: Optional[str] = None,
mode: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
project_name: Optional[str] = None,
retention_period: Optional[int] = None,
shard_count: Optional[int] = None,
shards: Optional[Sequence[StoreShardArgs]] = None,
telemetry_type: Optional[str] = None) -> Store
func GetStore(ctx *Context, name string, id IDInput, state *StoreState, opts ...ResourceOption) (*Store, error)
public static Store Get(string name, Input<string> id, StoreState? state, CustomResourceOptions? opts = null)
public static Store get(String name, Output<String> id, StoreState 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.
- Append
Meta bool - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - Auto
Split bool - Determines whether to automatically split a shard. Default to
false
. - Create
Time int - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- Enable
Web boolTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- Encrypt
Conf Pulumi.Ali Cloud. Log. Inputs. Store Encrypt Conf - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - Hot
Ttl int - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- Logstore
Name string - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - Max
Split intShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- Metering
Mode string - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- Mode string
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - Name string
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- Project string
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- Project
Name string - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - Retention
Period int - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- Shard
Count int - The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- Shards
List<Pulumi.
Ali Cloud. Log. Inputs. Store Shard> - The shard attribute.
- Telemetry
Type string Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- Append
Meta bool - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - Auto
Split bool - Determines whether to automatically split a shard. Default to
false
. - Create
Time int - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- Enable
Web boolTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- Encrypt
Conf StoreEncrypt Conf Args - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - Hot
Ttl int - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- Logstore
Name string - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - Max
Split intShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- Metering
Mode string - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- Mode string
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - Name string
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- Project string
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- Project
Name string - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - Retention
Period int - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- Shard
Count int - The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- Shards
[]Store
Shard Args - The shard attribute.
- Telemetry
Type string Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append
Meta Boolean - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto
Split Boolean - Determines whether to automatically split a shard. Default to
false
. - create
Time Integer - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- enable
Web BooleanTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt
Conf StoreEncrypt Conf - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot
Ttl Integer - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore
Name String - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max
Split IntegerShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering
Mode String - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode String
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name String
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project String
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project
Name String - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention
Period Integer - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- shard
Count Integer - The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- shards
List<Store
Shard> - The shard attribute.
- telemetry
Type String Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append
Meta boolean - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto
Split boolean - Determines whether to automatically split a shard. Default to
false
. - create
Time number - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- enable
Web booleanTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt
Conf StoreEncrypt Conf - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot
Ttl number - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore
Name string - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max
Split numberShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering
Mode string - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode string
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name string
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project string
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project
Name string - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention
Period number - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- shard
Count number - The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- shards
Store
Shard[] - The shard attribute.
- telemetry
Type string Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append_
meta bool - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto_
split bool - Determines whether to automatically split a shard. Default to
false
. - create_
time int - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- enable_
web_ booltracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt_
conf StoreEncrypt Conf Args - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot_
ttl int - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore_
name str - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max_
split_ intshard_ count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering_
mode str - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode str
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name str
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project str
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project_
name str - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention_
period int - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- shard_
count int - The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- shards
Sequence[Store
Shard Args] - The shard attribute.
- telemetry_
type str Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
- append
Meta Boolean - Determines whether to append log meta automatically. The meta includes log receive time and client IP address. Default to
true
. - auto
Split Boolean - Determines whether to automatically split a shard. Default to
false
. - create
Time Number - Log library creation time. Unix timestamp format that represents the number of seconds from 1970-1-1 00:00:00 UTC calculation.
- enable
Web BooleanTracking - Whether open webtracking. webtracking network tracing, support the collection of HTML log, H5, Ios and android platforms.
- encrypt
Conf Property Map - Encrypted storage of data, providing data static protection capability, encrypt_conf can be updated since 1.188.0 (only enable change is supported when updating logstore). See
encrypt_conf
below. - hot
Ttl Number - The ttl of hot storage. Default to 30, at least 30, hot storage ttl must be less than ttl.
- logstore
Name String - The log store, which is unique in the same project. You need to specify one of the attributes:
logstore_name
,name
. - max
Split NumberShard Count - The maximum number of shards for automatic split, which is in the range of 1 to 256. You must specify this parameter when autoSplit is true.
- metering
Mode String - Metering mode. The default metering mode of ChargeByFunction, ChargeByDataIngest traffic mode.
- mode String
- The mode of storage. Default to
standard
, must bestandard
orquery
,lite
. - name String
- . Field 'name' has been deprecated from provider version 1.215.0. New field 'logstore_name' instead.
- project String
- . Field 'project' has been deprecated from provider version 1.215.0. New field 'project_name' instead.
- project
Name String - The project name to the log store belongs. You need to specify one of the attributes:
project_name
,project
. - retention
Period Number - The data retention time (in days). Valid values: [1-3650]. Default to 30. Log store data will be stored permanently when the value is 3650.
- shard
Count Number - The number of shards in this log store. Default to 2. You can modify it by "Split" or "Merge" operations. Refer to details.
- shards List<Property Map>
- The shard attribute.
- telemetry
Type String Determines whether store type is metric.
Metrics
means metric store, empty means log store.The following arguments will be discarded. Please use new fields as soon as possible:
Supporting Types
StoreEncryptConf, StoreEncryptConfArgs
- Enable bool
- Enable encryption. Default false.
- Encrypt
Type string - Supported encryption type, only supports
default
(AES),m4
. - User
Cmk Pulumi.Info Ali Cloud. Log. Inputs. Store Encrypt Conf User Cmk Info - User bring your own key (BYOK) encryption Refer to details, the format is as follows. See user_cmk_info below.
{ "cmk_key_id": "your_cmk_key_id", "arn": "your_role_arn", "region_id": "you_cmk_region_id" }
. Seeuser_cmk_info
below.
- Enable bool
- Enable encryption. Default false.
- Encrypt
Type string - Supported encryption type, only supports
default
(AES),m4
. - User
Cmk StoreInfo Encrypt Conf User Cmk Info - User bring your own key (BYOK) encryption Refer to details, the format is as follows. See user_cmk_info below.
{ "cmk_key_id": "your_cmk_key_id", "arn": "your_role_arn", "region_id": "you_cmk_region_id" }
. Seeuser_cmk_info
below.
- enable Boolean
- Enable encryption. Default false.
- encrypt
Type String - Supported encryption type, only supports
default
(AES),m4
. - user
Cmk StoreInfo Encrypt Conf User Cmk Info - User bring your own key (BYOK) encryption Refer to details, the format is as follows. See user_cmk_info below.
{ "cmk_key_id": "your_cmk_key_id", "arn": "your_role_arn", "region_id": "you_cmk_region_id" }
. Seeuser_cmk_info
below.
- enable boolean
- Enable encryption. Default false.
- encrypt
Type string - Supported encryption type, only supports
default
(AES),m4
. - user
Cmk StoreInfo Encrypt Conf User Cmk Info - User bring your own key (BYOK) encryption Refer to details, the format is as follows. See user_cmk_info below.
{ "cmk_key_id": "your_cmk_key_id", "arn": "your_role_arn", "region_id": "you_cmk_region_id" }
. Seeuser_cmk_info
below.
- enable bool
- Enable encryption. Default false.
- encrypt_
type str - Supported encryption type, only supports
default
(AES),m4
. - user_
cmk_ Storeinfo Encrypt Conf User Cmk Info - User bring your own key (BYOK) encryption Refer to details, the format is as follows. See user_cmk_info below.
{ "cmk_key_id": "your_cmk_key_id", "arn": "your_role_arn", "region_id": "you_cmk_region_id" }
. Seeuser_cmk_info
below.
- enable Boolean
- Enable encryption. Default false.
- encrypt
Type String - Supported encryption type, only supports
default
(AES),m4
. - user
Cmk Property MapInfo - User bring your own key (BYOK) encryption Refer to details, the format is as follows. See user_cmk_info below.
{ "cmk_key_id": "your_cmk_key_id", "arn": "your_role_arn", "region_id": "you_cmk_region_id" }
. Seeuser_cmk_info
below.
StoreEncryptConfUserCmkInfo, StoreEncryptConfUserCmkInfoArgs
- arn str
- cmk_
key_ strid - region_
id str
StoreShard, StoreShardArgs
Import
SLS Log Store can be imported using the id, e.g.
$ pulumi import alicloud:log/store:Store example <project_name>:<logstore_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.