getGroupMetricRules

This data source provides the Cms Group Metric Rules of the current Alibaba Cloud user.

NOTE: Available in v1.104.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.CmsFunctions;
import com.pulumi.alicloud.cms.inputs.GetGroupMetricRulesArgs;
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 example = CmsFunctions.getGroupMetricRules(GetGroupMetricRulesArgs.builder()
.ids("4a9a8978-a9cc-55ca-aa7c-530ccd91ae57")
.nameRegex("the_resource_name")
.build());
ctx.export("firstCmsGroupMetricRuleId", example.applyValue(getGroupMetricRulesResult -> getGroupMetricRulesResult.rules()[0].id()));
}
}

Return

A collection of values returned by getGroupMetricRules.

Parameters

argument

A collection of arguments for invoking getGroupMetricRules.


suspend fun getGroupMetricRules(dimensions: String? = null, enableState: Boolean? = null, groupId: String? = null, groupMetricRuleName: String? = null, ids: List<String>? = null, metricName: String? = null, nameRegex: String? = null, namespace: String? = null, outputFile: String? = null, status: String? = null): GetGroupMetricRulesResult

Return

A collection of values returned by getGroupMetricRules.

See also

Parameters

dimensions

The dimensions that specify the resources to be associated with the alert rule.

enableState

Indicates whether the alert rule is enabled.

groupId

The ID of the application group.

groupMetricRuleName

The name of the alert rule.

ids

A list of Group Metric Rule IDs.

metricName

The name of the metric.

nameRegex

A regex string to filter results by Group Metric Rule name.

namespace

The namespace of the service.

outputFile

File name where to save data source results (after running pulumi preview).

status

The status of Group Metric Rule..


Return

A collection of values returned by getGroupMetricRules.

See also

Parameters

argument

Builder for com.pulumi.alicloud.cms.kotlin.inputs.GetGroupMetricRulesPlainArgs.