1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. sls
  6. MetricStore
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi

    Provides a SLS MetricStore resource. A MetricStore is a dedicated time-series data store in Simple Log Service for storing and querying metrics.

    For information about SLS MetricStore and how to use it, see MetricStore.

    NOTE: Available since v1.291.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultProject = new alicloud.log.Project("default", {
        projectName: `${name}-${_default.result}`,
        description: "terraform example project for metric store",
    });
    const defaultMetricStore = new alicloud.sls.MetricStore("default", {
        projectName: defaultProject.projectName,
        metricStoreName: `${name}-metric-store`,
        ttl: 30,
        shardCount: 2,
        autoSplit: true,
        maxSplitShardCount: 64,
        appendMeta: false,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = random.Integer("default",
        min=10000,
        max=99999)
    default_project = alicloud.log.Project("default",
        project_name=f"{name}-{default['result']}",
        description="terraform example project for metric store")
    default_metric_store = alicloud.sls.MetricStore("default",
        project_name=default_project.project_name,
        metric_store_name=f"{name}-metric-store",
        ttl=30,
        shard_count=2,
        auto_split=True,
        max_split_shard_count=64,
        append_meta=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sls"
    	"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, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultProject, err := log.NewProject(ctx, "default", &log.ProjectArgs{
    			ProjectName: pulumi.Sprintf("%v-%v", name, _default.Result),
    			Description: pulumi.String("terraform example project for metric store"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sls.NewMetricStore(ctx, "default", &sls.MetricStoreArgs{
    			ProjectName:        defaultProject.ProjectName,
    			MetricStoreName:    pulumi.Sprintf("%v-metric-store", name),
    			Ttl:                pulumi.Int(30),
    			ShardCount:         pulumi.Int(2),
    			AutoSplit:          pulumi.Bool(true),
    			MaxSplitShardCount: pulumi.Int(64),
    			AppendMeta:         pulumi.Bool(false),
    		})
    		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();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new Random.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultProject = new AliCloud.Log.Project("default", new()
        {
            ProjectName = $"{name}-{@default.Result}",
            Description = "terraform example project for metric store",
        });
    
        var defaultMetricStore = new AliCloud.Sls.MetricStore("default", new()
        {
            ProjectName = defaultProject.ProjectName,
            MetricStoreName = $"{name}-metric-store",
            Ttl = 30,
            ShardCount = 2,
            AutoSplit = true,
            MaxSplitShardCount = 64,
            AppendMeta = false,
        });
    
    });
    
    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.sls.MetricStore;
    import com.pulumi.alicloud.sls.MetricStoreArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 name = config.get("name").orElse("terraform-example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultProject = new Project("defaultProject", ProjectArgs.builder()
                .projectName(String.format("%s-%s", name,default_.result()))
                .description("terraform example project for metric store")
                .build());
    
            var defaultMetricStore = new MetricStore("defaultMetricStore", MetricStoreArgs.builder()
                .projectName(defaultProject.projectName())
                .metricStoreName(String.format("%s-metric-store", name))
                .ttl(30)
                .shardCount(2)
                .autoSplit(true)
                .maxSplitShardCount(64)
                .appendMeta(false)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: random:Integer
        properties:
          min: 10000
          max: 99999
      defaultProject:
        type: alicloud:log:Project
        name: default
        properties:
          projectName: ${name}-${default.result}
          description: terraform example project for metric store
      defaultMetricStore:
        type: alicloud:sls:MetricStore
        name: default
        properties:
          projectName: ${defaultProject.projectName}
          metricStoreName: ${name}-metric-store
          ttl: 30
          shardCount: 2
          autoSplit: true
          maxSplitShardCount: 64
          appendMeta: false
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
        random = {
          source = "pulumi/random"
        }
      }
    }
    
    resource "random_integer" "default" {
      min = 10000
      max = 99999
    }
    resource "alicloud_log_project" "default" {
      project_name ="${var.name}-${random_integer.default.result}"
      description  = "terraform example project for metric store"
    }
    resource "alicloud_sls_metricstore" "default" {
      project_name          = alicloud_log_project.default.project_name
      metric_store_name     ="${var.name}-metric-store"
      ttl                   = 30
      shard_count           = 2
      auto_split            = true
      max_split_shard_count = 64
      append_meta           = false
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create MetricStore Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MetricStore(name: string, args: MetricStoreArgs, opts?: CustomResourceOptions);
    @overload
    def MetricStore(resource_name: str,
                    args: MetricStoreArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricStore(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    metric_store_name: Optional[str] = None,
                    project_name: Optional[str] = None,
                    shard_count: Optional[int] = None,
                    ttl: Optional[int] = None,
                    append_meta: Optional[bool] = None,
                    auto_split: Optional[bool] = None,
                    encrypt_conf: Optional[MetricStoreEncryptConfArgs] = None,
                    hot_ttl: Optional[int] = None,
                    infrequent_access_ttl: Optional[int] = None,
                    max_split_shard_count: Optional[int] = None,
                    mode: Optional[str] = None)
    func NewMetricStore(ctx *Context, name string, args MetricStoreArgs, opts ...ResourceOption) (*MetricStore, error)
    public MetricStore(string name, MetricStoreArgs args, CustomResourceOptions? opts = null)
    public MetricStore(String name, MetricStoreArgs args)
    public MetricStore(String name, MetricStoreArgs args, CustomResourceOptions options)
    
    type: alicloud:sls:MetricStore
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_sls_metric_store" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args MetricStoreArgs
    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 MetricStoreArgs
    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 MetricStoreArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricStoreArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricStoreArgs
    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 metricStoreResource = new AliCloud.Sls.MetricStore("metricStoreResource", new()
    {
        MetricStoreName = "string",
        ProjectName = "string",
        ShardCount = 0,
        Ttl = 0,
        AppendMeta = false,
        AutoSplit = false,
        EncryptConf = new AliCloud.Sls.Inputs.MetricStoreEncryptConfArgs
        {
            Enable = false,
            EncryptType = "string",
            UserCmkInfo = new AliCloud.Sls.Inputs.MetricStoreEncryptConfUserCmkInfoArgs
            {
                Arn = "string",
                CmkKeyId = "string",
                RegionId = "string",
            },
        },
        HotTtl = 0,
        InfrequentAccessTtl = 0,
        MaxSplitShardCount = 0,
        Mode = "string",
    });
    
    example, err := sls.NewMetricStore(ctx, "metricStoreResource", &sls.MetricStoreArgs{
    	MetricStoreName: pulumi.String("string"),
    	ProjectName:     pulumi.String("string"),
    	ShardCount:      pulumi.Int(0),
    	Ttl:             pulumi.Int(0),
    	AppendMeta:      pulumi.Bool(false),
    	AutoSplit:       pulumi.Bool(false),
    	EncryptConf: &sls.MetricStoreEncryptConfArgs{
    		Enable:      pulumi.Bool(false),
    		EncryptType: pulumi.String("string"),
    		UserCmkInfo: &sls.MetricStoreEncryptConfUserCmkInfoArgs{
    			Arn:      pulumi.String("string"),
    			CmkKeyId: pulumi.String("string"),
    			RegionId: pulumi.String("string"),
    		},
    	},
    	HotTtl:              pulumi.Int(0),
    	InfrequentAccessTtl: pulumi.Int(0),
    	MaxSplitShardCount:  pulumi.Int(0),
    	Mode:                pulumi.String("string"),
    })
    
    resource "alicloud_sls_metric_store" "metricStoreResource" {
      lifecycle {
        create_before_destroy = true
      }
      metric_store_name = "string"
      project_name      = "string"
      shard_count       = 0
      ttl               = 0
      append_meta       = false
      auto_split        = false
      encrypt_conf = {
        enable       = false
        encrypt_type = "string"
        user_cmk_info = {
          arn        = "string"
          cmk_key_id = "string"
          region_id  = "string"
        }
      }
      hot_ttl               = 0
      infrequent_access_ttl = 0
      max_split_shard_count = 0
      mode                  = "string"
    }
    
    var metricStoreResource = new MetricStore("metricStoreResource", MetricStoreArgs.builder()
        .metricStoreName("string")
        .projectName("string")
        .shardCount(0)
        .ttl(0)
        .appendMeta(false)
        .autoSplit(false)
        .encryptConf(MetricStoreEncryptConfArgs.builder()
            .enable(false)
            .encryptType("string")
            .userCmkInfo(MetricStoreEncryptConfUserCmkInfoArgs.builder()
                .arn("string")
                .cmkKeyId("string")
                .regionId("string")
                .build())
            .build())
        .hotTtl(0)
        .infrequentAccessTtl(0)
        .maxSplitShardCount(0)
        .mode("string")
        .build());
    
    metric_store_resource = alicloud.sls.MetricStore("metricStoreResource",
        metric_store_name="string",
        project_name="string",
        shard_count=0,
        ttl=0,
        append_meta=False,
        auto_split=False,
        encrypt_conf={
            "enable": False,
            "encrypt_type": "string",
            "user_cmk_info": {
                "arn": "string",
                "cmk_key_id": "string",
                "region_id": "string",
            },
        },
        hot_ttl=0,
        infrequent_access_ttl=0,
        max_split_shard_count=0,
        mode="string")
    
    const metricStoreResource = new alicloud.sls.MetricStore("metricStoreResource", {
        metricStoreName: "string",
        projectName: "string",
        shardCount: 0,
        ttl: 0,
        appendMeta: false,
        autoSplit: false,
        encryptConf: {
            enable: false,
            encryptType: "string",
            userCmkInfo: {
                arn: "string",
                cmkKeyId: "string",
                regionId: "string",
            },
        },
        hotTtl: 0,
        infrequentAccessTtl: 0,
        maxSplitShardCount: 0,
        mode: "string",
    });
    
    type: alicloud:sls:MetricStore
    properties:
        appendMeta: false
        autoSplit: false
        encryptConf:
            enable: false
            encryptType: string
            userCmkInfo:
                arn: string
                cmkKeyId: string
                regionId: string
        hotTtl: 0
        infrequentAccessTtl: 0
        maxSplitShardCount: 0
        metricStoreName: string
        mode: string
        projectName: string
        shardCount: 0
        ttl: 0
    

    MetricStore 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 MetricStore resource accepts the following input properties:

    MetricStoreName string
    The name of the MetricStore.
    ProjectName string
    The name of the SLS project.
    ShardCount int
    The number of shards for the MetricStore.
    Ttl int
    The data retention period in days. Minimum value is 1.
    AppendMeta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    AutoSplit bool
    Specifies whether to automatically split shards. Default value: true.
    EncryptConf Pulumi.AliCloud.Sls.Inputs.MetricStoreEncryptConf
    The encryption configuration. See encryptConf below.
    HotTtl int
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    InfrequentAccessTtl int
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    MaxSplitShardCount int
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    Mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    MetricStoreName string
    The name of the MetricStore.
    ProjectName string
    The name of the SLS project.
    ShardCount int
    The number of shards for the MetricStore.
    Ttl int
    The data retention period in days. Minimum value is 1.
    AppendMeta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    AutoSplit bool
    Specifies whether to automatically split shards. Default value: true.
    EncryptConf MetricStoreEncryptConfArgs
    The encryption configuration. See encryptConf below.
    HotTtl int
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    InfrequentAccessTtl int
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    MaxSplitShardCount int
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    Mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    metric_store_name string
    The name of the MetricStore.
    project_name string
    The name of the SLS project.
    shard_count number
    The number of shards for the MetricStore.
    ttl number
    The data retention period in days. Minimum value is 1.
    append_meta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    auto_split bool
    Specifies whether to automatically split shards. Default value: true.
    encrypt_conf object
    The encryption configuration. See encryptConf below.
    hot_ttl number
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequent_access_ttl number
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    max_split_shard_count number
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    metricStoreName String
    The name of the MetricStore.
    projectName String
    The name of the SLS project.
    shardCount Integer
    The number of shards for the MetricStore.
    ttl Integer
    The data retention period in days. Minimum value is 1.
    appendMeta Boolean
    Specifies whether to record the IP address of the requester. Default value: false.
    autoSplit Boolean
    Specifies whether to automatically split shards. Default value: true.
    encryptConf MetricStoreEncryptConf
    The encryption configuration. See encryptConf below.
    hotTtl Integer
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequentAccessTtl Integer
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    maxSplitShardCount Integer
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    mode String
    The type of the MetricStore. Valid values: standard. Default value: standard.
    metricStoreName string
    The name of the MetricStore.
    projectName string
    The name of the SLS project.
    shardCount number
    The number of shards for the MetricStore.
    ttl number
    The data retention period in days. Minimum value is 1.
    appendMeta boolean
    Specifies whether to record the IP address of the requester. Default value: false.
    autoSplit boolean
    Specifies whether to automatically split shards. Default value: true.
    encryptConf MetricStoreEncryptConf
    The encryption configuration. See encryptConf below.
    hotTtl number
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequentAccessTtl number
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    maxSplitShardCount number
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    metric_store_name str
    The name of the MetricStore.
    project_name str
    The name of the SLS project.
    shard_count int
    The number of shards for the MetricStore.
    ttl int
    The data retention period in days. Minimum value is 1.
    append_meta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    auto_split bool
    Specifies whether to automatically split shards. Default value: true.
    encrypt_conf MetricStoreEncryptConfArgs
    The encryption configuration. See encryptConf below.
    hot_ttl int
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequent_access_ttl int
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    max_split_shard_count int
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    mode str
    The type of the MetricStore. Valid values: standard. Default value: standard.
    metricStoreName String
    The name of the MetricStore.
    projectName String
    The name of the SLS project.
    shardCount Number
    The number of shards for the MetricStore.
    ttl Number
    The data retention period in days. Minimum value is 1.
    appendMeta Boolean
    Specifies whether to record the IP address of the requester. Default value: false.
    autoSplit Boolean
    Specifies whether to automatically split shards. Default value: true.
    encryptConf Property Map
    The encryption configuration. See encryptConf below.
    hotTtl Number
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequentAccessTtl Number
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    maxSplitShardCount Number
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    mode String
    The type of the MetricStore. Valid values: standard. Default value: standard.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MetricStore resource produces the following output properties:

    CreateTime int
    The time when the MetricStore was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifyTime int
    The time when the MetricStore was last modified.
    CreateTime int
    The time when the MetricStore was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifyTime int
    The time when the MetricStore was last modified.
    create_time number
    The time when the MetricStore was created.
    id string
    The provider-assigned unique ID for this managed resource.
    last_modify_time number
    The time when the MetricStore was last modified.
    createTime Integer
    The time when the MetricStore was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifyTime Integer
    The time when the MetricStore was last modified.
    createTime number
    The time when the MetricStore was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModifyTime number
    The time when the MetricStore was last modified.
    create_time int
    The time when the MetricStore was created.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modify_time int
    The time when the MetricStore was last modified.
    createTime Number
    The time when the MetricStore was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifyTime Number
    The time when the MetricStore was last modified.

    Look up Existing MetricStore Resource

    Get an existing MetricStore 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?: MetricStoreState, opts?: CustomResourceOptions): MetricStore
    @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,
            encrypt_conf: Optional[MetricStoreEncryptConfArgs] = None,
            hot_ttl: Optional[int] = None,
            infrequent_access_ttl: Optional[int] = None,
            last_modify_time: Optional[int] = None,
            max_split_shard_count: Optional[int] = None,
            metric_store_name: Optional[str] = None,
            mode: Optional[str] = None,
            project_name: Optional[str] = None,
            shard_count: Optional[int] = None,
            ttl: Optional[int] = None) -> MetricStore
    func GetMetricStore(ctx *Context, name string, id IDInput, state *MetricStoreState, opts ...ResourceOption) (*MetricStore, error)
    public static MetricStore Get(string name, Input<string> id, MetricStoreState? state, CustomResourceOptions? opts = null)
    public static MetricStore get(String name, Output<String> id, MetricStoreState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:sls:MetricStore    get:      id: ${id}
    import {
      to = alicloud_sls_metric_store.example
      id = "${id}"
    }
    
    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.
    The following state arguments are supported:
    AppendMeta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    AutoSplit bool
    Specifies whether to automatically split shards. Default value: true.
    CreateTime int
    The time when the MetricStore was created.
    EncryptConf Pulumi.AliCloud.Sls.Inputs.MetricStoreEncryptConf
    The encryption configuration. See encryptConf below.
    HotTtl int
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    InfrequentAccessTtl int
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    LastModifyTime int
    The time when the MetricStore was last modified.
    MaxSplitShardCount int
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    MetricStoreName string
    The name of the MetricStore.
    Mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    ProjectName string
    The name of the SLS project.
    ShardCount int
    The number of shards for the MetricStore.
    Ttl int
    The data retention period in days. Minimum value is 1.
    AppendMeta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    AutoSplit bool
    Specifies whether to automatically split shards. Default value: true.
    CreateTime int
    The time when the MetricStore was created.
    EncryptConf MetricStoreEncryptConfArgs
    The encryption configuration. See encryptConf below.
    HotTtl int
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    InfrequentAccessTtl int
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    LastModifyTime int
    The time when the MetricStore was last modified.
    MaxSplitShardCount int
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    MetricStoreName string
    The name of the MetricStore.
    Mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    ProjectName string
    The name of the SLS project.
    ShardCount int
    The number of shards for the MetricStore.
    Ttl int
    The data retention period in days. Minimum value is 1.
    append_meta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    auto_split bool
    Specifies whether to automatically split shards. Default value: true.
    create_time number
    The time when the MetricStore was created.
    encrypt_conf object
    The encryption configuration. See encryptConf below.
    hot_ttl number
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequent_access_ttl number
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    last_modify_time number
    The time when the MetricStore was last modified.
    max_split_shard_count number
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    metric_store_name string
    The name of the MetricStore.
    mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    project_name string
    The name of the SLS project.
    shard_count number
    The number of shards for the MetricStore.
    ttl number
    The data retention period in days. Minimum value is 1.
    appendMeta Boolean
    Specifies whether to record the IP address of the requester. Default value: false.
    autoSplit Boolean
    Specifies whether to automatically split shards. Default value: true.
    createTime Integer
    The time when the MetricStore was created.
    encryptConf MetricStoreEncryptConf
    The encryption configuration. See encryptConf below.
    hotTtl Integer
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequentAccessTtl Integer
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    lastModifyTime Integer
    The time when the MetricStore was last modified.
    maxSplitShardCount Integer
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    metricStoreName String
    The name of the MetricStore.
    mode String
    The type of the MetricStore. Valid values: standard. Default value: standard.
    projectName String
    The name of the SLS project.
    shardCount Integer
    The number of shards for the MetricStore.
    ttl Integer
    The data retention period in days. Minimum value is 1.
    appendMeta boolean
    Specifies whether to record the IP address of the requester. Default value: false.
    autoSplit boolean
    Specifies whether to automatically split shards. Default value: true.
    createTime number
    The time when the MetricStore was created.
    encryptConf MetricStoreEncryptConf
    The encryption configuration. See encryptConf below.
    hotTtl number
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequentAccessTtl number
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    lastModifyTime number
    The time when the MetricStore was last modified.
    maxSplitShardCount number
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    metricStoreName string
    The name of the MetricStore.
    mode string
    The type of the MetricStore. Valid values: standard. Default value: standard.
    projectName string
    The name of the SLS project.
    shardCount number
    The number of shards for the MetricStore.
    ttl number
    The data retention period in days. Minimum value is 1.
    append_meta bool
    Specifies whether to record the IP address of the requester. Default value: false.
    auto_split bool
    Specifies whether to automatically split shards. Default value: true.
    create_time int
    The time when the MetricStore was created.
    encrypt_conf MetricStoreEncryptConfArgs
    The encryption configuration. See encryptConf below.
    hot_ttl int
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequent_access_ttl int
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    last_modify_time int
    The time when the MetricStore was last modified.
    max_split_shard_count int
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    metric_store_name str
    The name of the MetricStore.
    mode str
    The type of the MetricStore. Valid values: standard. Default value: standard.
    project_name str
    The name of the SLS project.
    shard_count int
    The number of shards for the MetricStore.
    ttl int
    The data retention period in days. Minimum value is 1.
    appendMeta Boolean
    Specifies whether to record the IP address of the requester. Default value: false.
    autoSplit Boolean
    Specifies whether to automatically split shards. Default value: true.
    createTime Number
    The time when the MetricStore was created.
    encryptConf Property Map
    The encryption configuration. See encryptConf below.
    hotTtl Number
    The data retention period in the hot storage tier, in days. Minimum value is 7. Set to -1 to retain data in the hot storage tier for the entire TTL.
    infrequentAccessTtl Number
    The data retention period in the Infrequent Access (IA) storage tier, in days. It must be greater than 60, and hotTtl + infrequentAccessTtl must not be greater than ttl.
    lastModifyTime Number
    The time when the MetricStore was last modified.
    maxSplitShardCount Number
    The maximum number of shards to split when auto-split is enabled. Valid values: 0 to 256. Default value: 64.
    metricStoreName String
    The name of the MetricStore.
    mode String
    The type of the MetricStore. Valid values: standard. Default value: standard.
    projectName String
    The name of the SLS project.
    shardCount Number
    The number of shards for the MetricStore.
    ttl Number
    The data retention period in days. Minimum value is 1.

    Supporting Types

    MetricStoreEncryptConf, MetricStoreEncryptConfArgs

    Enable bool
    Specifies whether to enable encryption.
    EncryptType string
    The encryption algorithm. Valid values: default.
    UserCmkInfo Pulumi.AliCloud.Sls.Inputs.MetricStoreEncryptConfUserCmkInfo
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.
    Enable bool
    Specifies whether to enable encryption.
    EncryptType string
    The encryption algorithm. Valid values: default.
    UserCmkInfo MetricStoreEncryptConfUserCmkInfo
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.
    enable bool
    Specifies whether to enable encryption.
    encrypt_type string
    The encryption algorithm. Valid values: default.
    user_cmk_info object
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.
    enable Boolean
    Specifies whether to enable encryption.
    encryptType String
    The encryption algorithm. Valid values: default.
    userCmkInfo MetricStoreEncryptConfUserCmkInfo
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.
    enable boolean
    Specifies whether to enable encryption.
    encryptType string
    The encryption algorithm. Valid values: default.
    userCmkInfo MetricStoreEncryptConfUserCmkInfo
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.
    enable bool
    Specifies whether to enable encryption.
    encrypt_type str
    The encryption algorithm. Valid values: default.
    user_cmk_info MetricStoreEncryptConfUserCmkInfo
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.
    enable Boolean
    Specifies whether to enable encryption.
    encryptType String
    The encryption algorithm. Valid values: default.
    userCmkInfo Property Map
    The BYOK (Bring Your Own Key) configuration. See userCmkInfo below.

    MetricStoreEncryptConfUserCmkInfo, MetricStoreEncryptConfUserCmkInfoArgs

    Arn string
    The ARN of the RAM role that is authorized to use the CMK.
    CmkKeyId string
    The ID of the CMK (Customer Master Key).
    RegionId string
    The region ID of the CMK.
    Arn string
    The ARN of the RAM role that is authorized to use the CMK.
    CmkKeyId string
    The ID of the CMK (Customer Master Key).
    RegionId string
    The region ID of the CMK.
    arn string
    The ARN of the RAM role that is authorized to use the CMK.
    cmk_key_id string
    The ID of the CMK (Customer Master Key).
    region_id string
    The region ID of the CMK.
    arn String
    The ARN of the RAM role that is authorized to use the CMK.
    cmkKeyId String
    The ID of the CMK (Customer Master Key).
    regionId String
    The region ID of the CMK.
    arn string
    The ARN of the RAM role that is authorized to use the CMK.
    cmkKeyId string
    The ID of the CMK (Customer Master Key).
    regionId string
    The region ID of the CMK.
    arn str
    The ARN of the RAM role that is authorized to use the CMK.
    cmk_key_id str
    The ID of the CMK (Customer Master Key).
    region_id str
    The region ID of the CMK.
    arn String
    The ARN of the RAM role that is authorized to use the CMK.
    cmkKeyId String
    The ID of the CMK (Customer Master Key).
    regionId String
    The region ID of the CMK.

    Import

    SLS MetricStore can be imported using the id, e.g.

    $ pulumi import alicloud:sls/metricStore:MetricStore example <project_name>:<metric_store_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.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.108.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial