Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
This data source provides the SLS MetricStores of the current Alibaba Cloud user.
NOTE: Available since v1.291.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.sls.getMetricStores({
projectName: "your-project-name",
nameRegex: ".*",
});
export const firstMetricStoreName = _default.then(_default => _default.names?.[0]);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.sls.get_metric_stores(project_name="your-project-name",
name_regex=".*")
pulumi.export("firstMetricStoreName", default.names[0])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sls"
"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 := sls.GetMetricStores(ctx, &sls.GetMetricStoresArgs{
ProjectName: "your-project-name",
NameRegex: pulumi.StringRef(".*"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstMetricStoreName", _default.Names[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Sls.GetMetricStores.Invoke(new()
{
ProjectName = "your-project-name",
NameRegex = ".*",
});
return new Dictionary<string, object?>
{
["firstMetricStoreName"] = @default.Apply(@default => @default.Apply(getMetricStoresResult => getMetricStoresResult.Names[0])),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sls.SlsFunctions;
import com.pulumi.alicloud.sls.inputs.GetMetricStoresArgs;
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");
final var default = SlsFunctions.getMetricStores(GetMetricStoresArgs.builder()
.projectName("your-project-name")
.nameRegex(".*")
.build());
ctx.export("firstMetricStoreName", default_.names()[0]);
}
}
configuration:
name:
type: string
default: terraform-example
variables:
default:
fn::invoke:
function: alicloud:sls:getMetricStores
arguments:
projectName: your-project-name
nameRegex: .*
outputs:
firstMetricStoreName: ${default.names[0]}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_sls_getmetricstores" "default" {
project_name = "your-project-name"
name_regex = ".*"
}
variable "name" {
type = string
default = "terraform-example"
}
output "firstMetricStoreName" {
value = data.alicloud_sls_getmetricstores.default.names[0]
}
Using getMetricStores
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMetricStores(args: GetMetricStoresArgs, opts?: InvokeOptions): Promise<GetMetricStoresResult>
function getMetricStoresOutput(args: GetMetricStoresOutputArgs, opts?: InvokeOutputOptions): Output<GetMetricStoresResult>def get_metric_stores(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
project_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMetricStoresResult
def get_metric_stores_output(ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
name_regex: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
project_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetMetricStoresResult]func GetMetricStores(ctx *Context, args *GetMetricStoresArgs, opts ...InvokeOption) (*GetMetricStoresResult, error)
func GetMetricStoresOutput(ctx *Context, args *GetMetricStoresOutputArgs, opts ...InvokeOption) GetMetricStoresResultOutput> Note: This function is named GetMetricStores in the Go SDK.
public static class GetMetricStores
{
public static Task<GetMetricStoresResult> InvokeAsync(GetMetricStoresArgs args, InvokeOptions? opts = null)
public static Output<GetMetricStoresResult> Invoke(GetMetricStoresInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetMetricStoresResult> Invoke(GetMetricStoresInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetMetricStoresResult> getMetricStores(GetMetricStoresArgs args, InvokeOptions options)
public static Output<GetMetricStoresResult> getMetricStores(GetMetricStoresArgs args, InvokeOptions options)
public static Output<GetMetricStoresResult> getMetricStores(GetMetricStoresArgs args, InvokeOutputOptions options)
fn::invoke:
function: alicloud:sls/getMetricStores:getMetricStores
arguments:
# arguments dictionarydata "alicloud_sls_get_metric_stores" "name" {
# arguments
}The following arguments are supported:
- Project
Name string - The name of the SLS project.
- Ids List<string>
- A list of MetricStore names to filter results.
- Name
Regex string - A regex string to apply to the MetricStore name.
- Output
File string - File name where to save data source results (after running
pulumi up).
- Project
Name string - The name of the SLS project.
- Ids []string
- A list of MetricStore names to filter results.
- Name
Regex string - A regex string to apply to the MetricStore name.
- Output
File string - File name where to save data source results (after running
pulumi up).
- project_
name string - The name of the SLS project.
- ids list(string)
- A list of MetricStore names to filter results.
- name_
regex string - A regex string to apply to the MetricStore name.
- output_
file string - File name where to save data source results (after running
pulumi up).
- project
Name String - The name of the SLS project.
- ids List<String>
- A list of MetricStore names to filter results.
- name
Regex String - A regex string to apply to the MetricStore name.
- output
File String - File name where to save data source results (after running
pulumi up).
- project
Name string - The name of the SLS project.
- ids string[]
- A list of MetricStore names to filter results.
- name
Regex string - A regex string to apply to the MetricStore name.
- output
File string - File name where to save data source results (after running
pulumi up).
- project_
name str - The name of the SLS project.
- ids Sequence[str]
- A list of MetricStore names to filter results.
- name_
regex str - A regex string to apply to the MetricStore name.
- output_
file str - File name where to save data source results (after running
pulumi up).
- project
Name String - The name of the SLS project.
- ids List<String>
- A list of MetricStore names to filter results.
- name
Regex String - A regex string to apply to the MetricStore name.
- output
File String - File name where to save data source results (after running
pulumi up).
getMetricStores Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Metric
Stores List<Pulumi.Ali Cloud. Sls. Outputs. Get Metric Stores Metric Store> - A list of MetricStores. Each element contains the following attributes:
- Names List<string>
- A list of MetricStore names.
- Project
Name string - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Metric
Stores []GetMetric Stores Metric Store - A list of MetricStores. Each element contains the following attributes:
- Names []string
- A list of MetricStore names.
- Project
Name string - Name
Regex string - Output
File string
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- metric_
stores list(object) - A list of MetricStores. Each element contains the following attributes:
- names list(string)
- A list of MetricStore names.
- project_
name string - name_
regex string - output_
file string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- metric
Stores List<GetMetric Stores Metric Store> - A list of MetricStores. Each element contains the following attributes:
- names List<String>
- A list of MetricStore names.
- project
Name String - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- metric
Stores GetMetric Stores Metric Store[] - A list of MetricStores. Each element contains the following attributes:
- names string[]
- A list of MetricStore names.
- project
Name string - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- metric_
stores Sequence[GetMetric Stores Metric Store] - A list of MetricStores. Each element contains the following attributes:
- names Sequence[str]
- A list of MetricStore names.
- project_
name str - name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- metric
Stores List<Property Map> - A list of MetricStores. Each element contains the following attributes:
- names List<String>
- A list of MetricStore names.
- project
Name String - name
Regex String - output
File String
Supporting Types
GetMetricStoresMetricStore
- Append
Meta bool - Whether to record the IP address of the requester.
- Auto
Split bool - Whether automatic shard splitting is enabled.
- Create
Time int - The time when the MetricStore was created.
- Hot
Ttl int - The data retention period in the hot storage tier, in days.
- Id string
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - Last
Modify intTime - The time when the MetricStore was last modified.
- Max
Split intShard Count - The maximum number of shards to split.
- Metric
Store stringName - The name of the MetricStore.
- Mode string
- The type of the MetricStore.
- int
- The number of shards.
- Ttl int
- The data retention period in days.
- Append
Meta bool - Whether to record the IP address of the requester.
- Auto
Split bool - Whether automatic shard splitting is enabled.
- Create
Time int - The time when the MetricStore was created.
- Hot
Ttl int - The data retention period in the hot storage tier, in days.
- Id string
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - Last
Modify intTime - The time when the MetricStore was last modified.
- Max
Split intShard Count - The maximum number of shards to split.
- Metric
Store stringName - The name of the MetricStore.
- Mode string
- The type of the MetricStore.
- int
- The number of shards.
- Ttl int
- The data retention period in days.
- append_
meta bool - Whether to record the IP address of the requester.
- auto_
split bool - Whether automatic shard splitting is enabled.
- create_
time number - The time when the MetricStore was created.
- hot_
ttl number - The data retention period in the hot storage tier, in days.
- id string
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - last_
modify_ numbertime - The time when the MetricStore was last modified.
- max_
split_ numbershard_ count - The maximum number of shards to split.
- metric_
store_ stringname - The name of the MetricStore.
- mode string
- The type of the MetricStore.
- number
- The number of shards.
- ttl number
- The data retention period in days.
- append
Meta Boolean - Whether to record the IP address of the requester.
- auto
Split Boolean - Whether automatic shard splitting is enabled.
- create
Time Integer - The time when the MetricStore was created.
- hot
Ttl Integer - The data retention period in the hot storage tier, in days.
- id String
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - last
Modify IntegerTime - The time when the MetricStore was last modified.
- max
Split IntegerShard Count - The maximum number of shards to split.
- metric
Store StringName - The name of the MetricStore.
- mode String
- The type of the MetricStore.
- Integer
- The number of shards.
- ttl Integer
- The data retention period in days.
- append
Meta boolean - Whether to record the IP address of the requester.
- auto
Split boolean - Whether automatic shard splitting is enabled.
- create
Time number - The time when the MetricStore was created.
- hot
Ttl number - The data retention period in the hot storage tier, in days.
- id string
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - last
Modify numberTime - The time when the MetricStore was last modified.
- max
Split numberShard Count - The maximum number of shards to split.
- metric
Store stringName - The name of the MetricStore.
- mode string
- The type of the MetricStore.
- number
- The number of shards.
- ttl number
- The data retention period in days.
- append_
meta bool - Whether to record the IP address of the requester.
- auto_
split bool - Whether automatic shard splitting is enabled.
- create_
time int - The time when the MetricStore was created.
- hot_
ttl int - The data retention period in the hot storage tier, in days.
- id str
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - last_
modify_ inttime - The time when the MetricStore was last modified.
- max_
split_ intshard_ count - The maximum number of shards to split.
- metric_
store_ strname - The name of the MetricStore.
- mode str
- The type of the MetricStore.
- int
- The number of shards.
- ttl int
- The data retention period in days.
- append
Meta Boolean - Whether to record the IP address of the requester.
- auto
Split Boolean - Whether automatic shard splitting is enabled.
- create
Time Number - The time when the MetricStore was created.
- hot
Ttl Number - The data retention period in the hot storage tier, in days.
- id String
- The ID of the MetricStore. The value is formatted as
<project_name>:<metric_store_name>. - last
Modify NumberTime - The time when the MetricStore was last modified.
- max
Split NumberShard Count - The maximum number of shards to split.
- metric
Store StringName - The name of the MetricStore.
- mode String
- The type of the MetricStore.
- Number
- The number of shards.
- ttl Number
- The data retention period in days.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi