Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.arms.getPrometheusMonitorings
This data source provides the Arms Prometheus Monitorings of the current Alibaba Cloud user.
NOTE: Available since v1.210.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.arms.getPrometheusMonitorings({
clusterId: "your_cluster_id",
ids: ["example_id"],
});
export const armsPrometheusMonitoringsId1 = ids.then(ids => ids.prometheusMonitorings?.[0]?.id);
const nameRegex = alicloud.arms.getPrometheusMonitorings({
clusterId: "your_cluster_id",
nameRegex: "tf-example",
});
export const armsPrometheusMonitoringsId2 = nameRegex.then(nameRegex => nameRegex.prometheusMonitorings?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.arms.get_prometheus_monitorings(cluster_id="your_cluster_id",
ids=["example_id"])
pulumi.export("armsPrometheusMonitoringsId1", ids.prometheus_monitorings[0].id)
name_regex = alicloud.arms.get_prometheus_monitorings(cluster_id="your_cluster_id",
name_regex="tf-example")
pulumi.export("armsPrometheusMonitoringsId2", name_regex.prometheus_monitorings[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/arms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := arms.GetPrometheusMonitorings(ctx, &arms.GetPrometheusMonitoringsArgs{
ClusterId: "your_cluster_id",
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("armsPrometheusMonitoringsId1", ids.PrometheusMonitorings[0].Id)
nameRegex, err := arms.GetPrometheusMonitorings(ctx, &arms.GetPrometheusMonitoringsArgs{
ClusterId: "your_cluster_id",
NameRegex: pulumi.StringRef("tf-example"),
}, nil)
if err != nil {
return err
}
ctx.Export("armsPrometheusMonitoringsId2", nameRegex.PrometheusMonitorings[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Arms.GetPrometheusMonitorings.Invoke(new()
{
ClusterId = "your_cluster_id",
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.Arms.GetPrometheusMonitorings.Invoke(new()
{
ClusterId = "your_cluster_id",
NameRegex = "tf-example",
});
return new Dictionary<string, object?>
{
["armsPrometheusMonitoringsId1"] = ids.Apply(getPrometheusMonitoringsResult => getPrometheusMonitoringsResult.PrometheusMonitorings[0]?.Id),
["armsPrometheusMonitoringsId2"] = nameRegex.Apply(getPrometheusMonitoringsResult => getPrometheusMonitoringsResult.PrometheusMonitorings[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.ArmsFunctions;
import com.pulumi.alicloud.arms.inputs.GetPrometheusMonitoringsArgs;
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 ids = ArmsFunctions.getPrometheusMonitorings(GetPrometheusMonitoringsArgs.builder()
.clusterId("your_cluster_id")
.ids("example_id")
.build());
ctx.export("armsPrometheusMonitoringsId1", ids.prometheusMonitorings()[0].id());
final var nameRegex = ArmsFunctions.getPrometheusMonitorings(GetPrometheusMonitoringsArgs.builder()
.clusterId("your_cluster_id")
.nameRegex("tf-example")
.build());
ctx.export("armsPrometheusMonitoringsId2", nameRegex.prometheusMonitorings()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:arms:getPrometheusMonitorings
arguments:
clusterId: your_cluster_id
ids:
- example_id
nameRegex:
fn::invoke:
function: alicloud:arms:getPrometheusMonitorings
arguments:
clusterId: your_cluster_id
nameRegex: tf-example
outputs:
armsPrometheusMonitoringsId1: ${ids.prometheusMonitorings[0].id}
armsPrometheusMonitoringsId2: ${nameRegex.prometheusMonitorings[0].id}
Using getPrometheusMonitorings
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 getPrometheusMonitorings(args: GetPrometheusMonitoringsArgs, opts?: InvokeOptions): Promise<GetPrometheusMonitoringsResult>
function getPrometheusMonitoringsOutput(args: GetPrometheusMonitoringsOutputArgs, opts?: InvokeOptions): Output<GetPrometheusMonitoringsResult>
def get_prometheus_monitorings(cluster_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPrometheusMonitoringsResult
def get_prometheus_monitorings_output(cluster_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPrometheusMonitoringsResult]
func GetPrometheusMonitorings(ctx *Context, args *GetPrometheusMonitoringsArgs, opts ...InvokeOption) (*GetPrometheusMonitoringsResult, error)
func GetPrometheusMonitoringsOutput(ctx *Context, args *GetPrometheusMonitoringsOutputArgs, opts ...InvokeOption) GetPrometheusMonitoringsResultOutput
> Note: This function is named GetPrometheusMonitorings
in the Go SDK.
public static class GetPrometheusMonitorings
{
public static Task<GetPrometheusMonitoringsResult> InvokeAsync(GetPrometheusMonitoringsArgs args, InvokeOptions? opts = null)
public static Output<GetPrometheusMonitoringsResult> Invoke(GetPrometheusMonitoringsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPrometheusMonitoringsResult> getPrometheusMonitorings(GetPrometheusMonitoringsArgs args, InvokeOptions options)
public static Output<GetPrometheusMonitoringsResult> getPrometheusMonitorings(GetPrometheusMonitoringsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:arms/getPrometheusMonitorings:getPrometheusMonitorings
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Id string - The ID of the Prometheus instance.
- Ids List<string>
- A list of Prometheus Monitoring IDs.
- Name
Regex string - A regex string to filter results by Prometheus Monitoring name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the monitoring configuration. Valid values:
run
,stop
. - Type string
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- Cluster
Id string - The ID of the Prometheus instance.
- Ids []string
- A list of Prometheus Monitoring IDs.
- Name
Regex string - A regex string to filter results by Prometheus Monitoring name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the monitoring configuration. Valid values:
run
,stop
. - Type string
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster
Id String - The ID of the Prometheus instance.
- ids List<String>
- A list of Prometheus Monitoring IDs.
- name
Regex String - A regex string to filter results by Prometheus Monitoring name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the monitoring configuration. Valid values:
run
,stop
. - type String
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster
Id string - The ID of the Prometheus instance.
- ids string[]
- A list of Prometheus Monitoring IDs.
- name
Regex string - A regex string to filter results by Prometheus Monitoring name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the monitoring configuration. Valid values:
run
,stop
. - type string
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster_
id str - The ID of the Prometheus instance.
- ids Sequence[str]
- A list of Prometheus Monitoring IDs.
- name_
regex str - A regex string to filter results by Prometheus Monitoring name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the monitoring configuration. Valid values:
run
,stop
. - type str
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster
Id String - The ID of the Prometheus instance.
- ids List<String>
- A list of Prometheus Monitoring IDs.
- name
Regex String - A regex string to filter results by Prometheus Monitoring name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the monitoring configuration. Valid values:
run
,stop
. - type String
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
getPrometheusMonitorings Result
The following output properties are available:
- Cluster
Id string - The ID of the Prometheus instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Prometheus Monitoring names.
- Prometheus
Monitorings List<Pulumi.Ali Cloud. Arms. Outputs. Get Prometheus Monitorings Prometheus Monitoring> - A list of Prometheus Monitorings. Each element contains the following attributes:
- Name
Regex string - Output
File string - Status string
- The status of the monitoring configuration.
- Type string
- The type of the monitoring configuration.
- Cluster
Id string - The ID of the Prometheus instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Prometheus Monitoring names.
- Prometheus
Monitorings []GetPrometheus Monitorings Prometheus Monitoring - A list of Prometheus Monitorings. Each element contains the following attributes:
- Name
Regex string - Output
File string - Status string
- The status of the monitoring configuration.
- Type string
- The type of the monitoring configuration.
- cluster
Id String - The ID of the Prometheus instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Prometheus Monitoring names.
- prometheus
Monitorings List<GetPrometheus Monitorings Prometheus Monitoring> - A list of Prometheus Monitorings. Each element contains the following attributes:
- name
Regex String - output
File String - status String
- The status of the monitoring configuration.
- type String
- The type of the monitoring configuration.
- cluster
Id string - The ID of the Prometheus instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Prometheus Monitoring names.
- prometheus
Monitorings GetPrometheus Monitorings Prometheus Monitoring[] - A list of Prometheus Monitorings. Each element contains the following attributes:
- name
Regex string - output
File string - status string
- The status of the monitoring configuration.
- type string
- The type of the monitoring configuration.
- cluster_
id str - The ID of the Prometheus instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Prometheus Monitoring names.
- prometheus_
monitorings Sequence[GetPrometheus Monitorings Prometheus Monitoring] - A list of Prometheus Monitorings. Each element contains the following attributes:
- name_
regex str - output_
file str - status str
- The status of the monitoring configuration.
- type str
- The type of the monitoring configuration.
- cluster
Id String - The ID of the Prometheus instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Prometheus Monitoring names.
- prometheus
Monitorings List<Property Map> - A list of Prometheus Monitorings. Each element contains the following attributes:
- name
Regex String - output
File String - status String
- The status of the monitoring configuration.
- type String
- The type of the monitoring configuration.
Supporting Types
GetPrometheusMonitoringsPrometheusMonitoring
- Cluster
Id string - The ID of the Prometheus instance.
- Config
Yaml string - The monitoring configuration. The value is a YAML string.
- Id string
- The ID of the Prometheus Monitoring. It formats as
<cluster_id>:<monitoring_name>:<type>
. - Monitoring
Name string - The name of the monitoring configuration.
- Status string
- The status of the monitoring configuration. Valid values:
run
,stop
. - Type string
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- Cluster
Id string - The ID of the Prometheus instance.
- Config
Yaml string - The monitoring configuration. The value is a YAML string.
- Id string
- The ID of the Prometheus Monitoring. It formats as
<cluster_id>:<monitoring_name>:<type>
. - Monitoring
Name string - The name of the monitoring configuration.
- Status string
- The status of the monitoring configuration. Valid values:
run
,stop
. - Type string
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster
Id String - The ID of the Prometheus instance.
- config
Yaml String - The monitoring configuration. The value is a YAML string.
- id String
- The ID of the Prometheus Monitoring. It formats as
<cluster_id>:<monitoring_name>:<type>
. - monitoring
Name String - The name of the monitoring configuration.
- status String
- The status of the monitoring configuration. Valid values:
run
,stop
. - type String
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster
Id string - The ID of the Prometheus instance.
- config
Yaml string - The monitoring configuration. The value is a YAML string.
- id string
- The ID of the Prometheus Monitoring. It formats as
<cluster_id>:<monitoring_name>:<type>
. - monitoring
Name string - The name of the monitoring configuration.
- status string
- The status of the monitoring configuration. Valid values:
run
,stop
. - type string
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster_
id str - The ID of the Prometheus instance.
- config_
yaml str - The monitoring configuration. The value is a YAML string.
- id str
- The ID of the Prometheus Monitoring. It formats as
<cluster_id>:<monitoring_name>:<type>
. - monitoring_
name str - The name of the monitoring configuration.
- status str
- The status of the monitoring configuration. Valid values:
run
,stop
. - type str
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
- cluster
Id String - The ID of the Prometheus instance.
- config
Yaml String - The monitoring configuration. The value is a YAML string.
- id String
- The ID of the Prometheus Monitoring. It formats as
<cluster_id>:<monitoring_name>:<type>
. - monitoring
Name String - The name of the monitoring configuration.
- status String
- The status of the monitoring configuration. Valid values:
run
,stop
. - type String
- The type of the monitoring configuration. Valid values:
serviceMonitor
,podMonitor
,customJob
,probe
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.