1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. getMetricRuleBlackLists
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cms.getMetricRuleBlackLists

Explore with Pulumi AI

This data source provides Cloud Monitor Service Metric Rule Black List available to the user.What is Metric Rule Black List

NOTE: Available in 1.194.0+

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.cms.getMetricRuleBlackLists({
    ids: [defaultAlicloudCmsMetricRuleBlackLists.id],
    category: "ecs",
    namespace: "acs_ecs_dashboard",
});
export const alicloudCmsRuleBlackListExampleId = lists[0].id;
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cms.get_metric_rule_black_lists(ids=[default_alicloud_cms_metric_rule_black_lists["id"]],
    category="ecs",
    namespace="acs_ecs_dashboard")
pulumi.export("alicloudCmsRuleBlackListExampleId", lists[0]["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cms.GetMetricRuleBlackLists(ctx, &cms.GetMetricRuleBlackListsArgs{
Ids: interface{}{
defaultAlicloudCmsMetricRuleBlackLists.Id,
},
Category: pulumi.StringRef("ecs"),
Namespace: pulumi.StringRef("acs_ecs_dashboard"),
}, nil);
if err != nil {
return err
}
ctx.Export("alicloudCmsRuleBlackListExampleId", lists[0].Id)
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Cms.GetMetricRuleBlackLists.Invoke(new()
    {
        Ids = new[]
        {
            defaultAlicloudCmsMetricRuleBlackLists.Id,
        },
        Category = "ecs",
        Namespace = "acs_ecs_dashboard",
    });

    return new Dictionary<string, object?>
    {
        ["alicloudCmsRuleBlackListExampleId"] = lists[0].Id,
    };
});
Copy
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.GetMetricRuleBlackListsArgs;
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 default = CmsFunctions.getMetricRuleBlackLists(GetMetricRuleBlackListsArgs.builder()
            .ids(defaultAlicloudCmsMetricRuleBlackLists.id())
            .category("ecs")
            .namespace("acs_ecs_dashboard")
            .build());

        ctx.export("alicloudCmsRuleBlackListExampleId", lists[0].id());
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:cms:getMetricRuleBlackLists
      arguments:
        ids:
          - ${defaultAlicloudCmsMetricRuleBlackLists.id}
        category: ecs
        namespace: acs_ecs_dashboard
outputs:
  alicloudCmsRuleBlackListExampleId: ${lists[0].id}
Copy

Using getMetricRuleBlackLists

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 getMetricRuleBlackLists(args: GetMetricRuleBlackListsArgs, opts?: InvokeOptions): Promise<GetMetricRuleBlackListsResult>
function getMetricRuleBlackListsOutput(args: GetMetricRuleBlackListsOutputArgs, opts?: InvokeOptions): Output<GetMetricRuleBlackListsResult>
Copy
def get_metric_rule_black_lists(category: Optional[str] = None,
                                ids: Optional[Sequence[str]] = None,
                                metric_rule_black_list_id: Optional[str] = None,
                                name_regex: Optional[str] = None,
                                namespace: Optional[str] = None,
                                order: Optional[int] = None,
                                output_file: Optional[str] = None,
                                page_number: Optional[int] = None,
                                page_size: Optional[int] = None,
                                opts: Optional[InvokeOptions] = None) -> GetMetricRuleBlackListsResult
def get_metric_rule_black_lists_output(category: Optional[pulumi.Input[str]] = None,
                                ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                metric_rule_black_list_id: Optional[pulumi.Input[str]] = None,
                                name_regex: Optional[pulumi.Input[str]] = None,
                                namespace: Optional[pulumi.Input[str]] = None,
                                order: Optional[pulumi.Input[int]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                page_number: Optional[pulumi.Input[int]] = None,
                                page_size: Optional[pulumi.Input[int]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetMetricRuleBlackListsResult]
Copy
func GetMetricRuleBlackLists(ctx *Context, args *GetMetricRuleBlackListsArgs, opts ...InvokeOption) (*GetMetricRuleBlackListsResult, error)
func GetMetricRuleBlackListsOutput(ctx *Context, args *GetMetricRuleBlackListsOutputArgs, opts ...InvokeOption) GetMetricRuleBlackListsResultOutput
Copy

> Note: This function is named GetMetricRuleBlackLists in the Go SDK.

public static class GetMetricRuleBlackLists 
{
    public static Task<GetMetricRuleBlackListsResult> InvokeAsync(GetMetricRuleBlackListsArgs args, InvokeOptions? opts = null)
    public static Output<GetMetricRuleBlackListsResult> Invoke(GetMetricRuleBlackListsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMetricRuleBlackListsResult> getMetricRuleBlackLists(GetMetricRuleBlackListsArgs args, InvokeOptions options)
public static Output<GetMetricRuleBlackListsResult> getMetricRuleBlackLists(GetMetricRuleBlackListsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cms/getMetricRuleBlackLists:getMetricRuleBlackLists
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Category Changes to this property will trigger replacement. string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
Ids List<string>
A list of Metric Rule Black List IDs.
MetricRuleBlackListId Changes to this property will trigger replacement. string
The first ID of the resource
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
Namespace Changes to this property will trigger replacement. string
The data namespace of the cloud service.
Order Changes to this property will trigger replacement. int
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
Category Changes to this property will trigger replacement. string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
Ids []string
A list of Metric Rule Black List IDs.
MetricRuleBlackListId Changes to this property will trigger replacement. string
The first ID of the resource
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
Namespace Changes to this property will trigger replacement. string
The data namespace of the cloud service.
Order Changes to this property will trigger replacement. int
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
category Changes to this property will trigger replacement. String
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
ids List<String>
A list of Metric Rule Black List IDs.
metricRuleBlackListId Changes to this property will trigger replacement. String
The first ID of the resource
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
namespace Changes to this property will trigger replacement. String
The data namespace of the cloud service.
order Changes to this property will trigger replacement. Integer
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Integer
pageSize Integer
category Changes to this property will trigger replacement. string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
ids string[]
A list of Metric Rule Black List IDs.
metricRuleBlackListId Changes to this property will trigger replacement. string
The first ID of the resource
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
namespace Changes to this property will trigger replacement. string
The data namespace of the cloud service.
order Changes to this property will trigger replacement. number
outputFile string
File name where to save data source results (after running pulumi preview).
pageNumber number
pageSize number
category Changes to this property will trigger replacement. str
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
ids Sequence[str]
A list of Metric Rule Black List IDs.
metric_rule_black_list_id Changes to this property will trigger replacement. str
The first ID of the resource
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Group Metric Rule name.
namespace Changes to this property will trigger replacement. str
The data namespace of the cloud service.
order Changes to this property will trigger replacement. int
output_file str
File name where to save data source results (after running pulumi preview).
page_number int
page_size int
category Changes to this property will trigger replacement. String
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
ids List<String>
A list of Metric Rule Black List IDs.
metricRuleBlackListId Changes to this property will trigger replacement. String
The first ID of the resource
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
namespace Changes to this property will trigger replacement. String
The data namespace of the cloud service.
order Changes to this property will trigger replacement. Number
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Number
pageSize Number

getMetricRuleBlackLists Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of Metric Rule Black List IDs.
Lists List<Pulumi.AliCloud.Cms.Outputs.GetMetricRuleBlackListsList>
A list of Metric Rule Black List Entries. Each element contains the following attributes:
Names List<string>
A list of name of Metric Rule Black Lists.
Category string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
MetricRuleBlackListId string
The first ID of the resource
NameRegex string
Namespace string
The data namespace of the cloud service.
Order int
OutputFile string
PageNumber int
PageSize int
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Metric Rule Black List IDs.
Lists []GetMetricRuleBlackListsList
A list of Metric Rule Black List Entries. Each element contains the following attributes:
Names []string
A list of name of Metric Rule Black Lists.
Category string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
MetricRuleBlackListId string
The first ID of the resource
NameRegex string
Namespace string
The data namespace of the cloud service.
Order int
OutputFile string
PageNumber int
PageSize int
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Metric Rule Black List IDs.
lists List<GetMetricRuleBlackListsList>
A list of Metric Rule Black List Entries. Each element contains the following attributes:
names List<String>
A list of name of Metric Rule Black Lists.
category String
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
metricRuleBlackListId String
The first ID of the resource
nameRegex String
namespace String
The data namespace of the cloud service.
order Integer
outputFile String
pageNumber Integer
pageSize Integer
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Metric Rule Black List IDs.
lists GetMetricRuleBlackListsList[]
A list of Metric Rule Black List Entries. Each element contains the following attributes:
names string[]
A list of name of Metric Rule Black Lists.
category string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
metricRuleBlackListId string
The first ID of the resource
nameRegex string
namespace string
The data namespace of the cloud service.
order number
outputFile string
pageNumber number
pageSize number
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Metric Rule Black List IDs.
lists Sequence[GetMetricRuleBlackListsList]
A list of Metric Rule Black List Entries. Each element contains the following attributes:
names Sequence[str]
A list of name of Metric Rule Black Lists.
category str
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
metric_rule_black_list_id str
The first ID of the resource
name_regex str
namespace str
The data namespace of the cloud service.
order int
output_file str
page_number int
page_size int
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Metric Rule Black List IDs.
lists List<Property Map>
A list of Metric Rule Black List Entries. Each element contains the following attributes:
names List<String>
A list of name of Metric Rule Black Lists.
category String
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
metricRuleBlackListId String
The first ID of the resource
nameRegex String
namespace String
The data namespace of the cloud service.
order Number
outputFile String
pageNumber Number
pageSize Number

Supporting Types

GetMetricRuleBlackListsList

Category This property is required. string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
CreateTime This property is required. string
The timestamp for creating an alert blacklist policy.Unit: milliseconds.
EffectiveTime This property is required. string
The effective time range of the alert blacklist policy.
EnableEndTime This property is required. string
The start timestamp of the alert blacklist policy.Unit: milliseconds.
EnableStartTime This property is required. string
The end timestamp of the alert blacklist policy.Unit: milliseconds.
Id This property is required. string
Instances This property is required. List<string>
The list of instances of cloud services specified in the alert blacklist policy.
IsEnable This property is required. bool
The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
MetricRuleBlackListId This property is required. string
The first ID of the resource
MetricRuleBlackListName This property is required. string
The name of the alert blacklist policy.
Metrics This property is required. List<Pulumi.AliCloud.Cms.Inputs.GetMetricRuleBlackListsListMetric>
Monitoring metrics in the instance.
Namespace This property is required. string
The data namespace of the cloud service.
ScopeType This property is required. string
The effective range of the alert blacklist policy. Value:-USER: The alert blacklist policy only takes effect in the current Alibaba cloud account.-GROUP: The alert blacklist policy takes effect in the specified application GROUP.
ScopeValues This property is required. List<string>
Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
Category This property is required. string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
CreateTime This property is required. string
The timestamp for creating an alert blacklist policy.Unit: milliseconds.
EffectiveTime This property is required. string
The effective time range of the alert blacklist policy.
EnableEndTime This property is required. string
The start timestamp of the alert blacklist policy.Unit: milliseconds.
EnableStartTime This property is required. string
The end timestamp of the alert blacklist policy.Unit: milliseconds.
Id This property is required. string
Instances This property is required. []string
The list of instances of cloud services specified in the alert blacklist policy.
IsEnable This property is required. bool
The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
MetricRuleBlackListId This property is required. string
The first ID of the resource
MetricRuleBlackListName This property is required. string
The name of the alert blacklist policy.
Metrics This property is required. []GetMetricRuleBlackListsListMetric
Monitoring metrics in the instance.
Namespace This property is required. string
The data namespace of the cloud service.
ScopeType This property is required. string
The effective range of the alert blacklist policy. Value:-USER: The alert blacklist policy only takes effect in the current Alibaba cloud account.-GROUP: The alert blacklist policy takes effect in the specified application GROUP.
ScopeValues This property is required. []string
Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
category This property is required. String
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
createTime This property is required. String
The timestamp for creating an alert blacklist policy.Unit: milliseconds.
effectiveTime This property is required. String
The effective time range of the alert blacklist policy.
enableEndTime This property is required. String
The start timestamp of the alert blacklist policy.Unit: milliseconds.
enableStartTime This property is required. String
The end timestamp of the alert blacklist policy.Unit: milliseconds.
id This property is required. String
instances This property is required. List<String>
The list of instances of cloud services specified in the alert blacklist policy.
isEnable This property is required. Boolean
The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
metricRuleBlackListId This property is required. String
The first ID of the resource
metricRuleBlackListName This property is required. String
The name of the alert blacklist policy.
metrics This property is required. List<GetMetricRuleBlackListsListMetric>
Monitoring metrics in the instance.
namespace This property is required. String
The data namespace of the cloud service.
scopeType This property is required. String
The effective range of the alert blacklist policy. Value:-USER: The alert blacklist policy only takes effect in the current Alibaba cloud account.-GROUP: The alert blacklist policy takes effect in the specified application GROUP.
scopeValues This property is required. List<String>
Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
category This property is required. string
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
createTime This property is required. string
The timestamp for creating an alert blacklist policy.Unit: milliseconds.
effectiveTime This property is required. string
The effective time range of the alert blacklist policy.
enableEndTime This property is required. string
The start timestamp of the alert blacklist policy.Unit: milliseconds.
enableStartTime This property is required. string
The end timestamp of the alert blacklist policy.Unit: milliseconds.
id This property is required. string
instances This property is required. string[]
The list of instances of cloud services specified in the alert blacklist policy.
isEnable This property is required. boolean
The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
metricRuleBlackListId This property is required. string
The first ID of the resource
metricRuleBlackListName This property is required. string
The name of the alert blacklist policy.
metrics This property is required. GetMetricRuleBlackListsListMetric[]
Monitoring metrics in the instance.
namespace This property is required. string
The data namespace of the cloud service.
scopeType This property is required. string
The effective range of the alert blacklist policy. Value:-USER: The alert blacklist policy only takes effect in the current Alibaba cloud account.-GROUP: The alert blacklist policy takes effect in the specified application GROUP.
scopeValues This property is required. string[]
Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
category This property is required. str
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
create_time This property is required. str
The timestamp for creating an alert blacklist policy.Unit: milliseconds.
effective_time This property is required. str
The effective time range of the alert blacklist policy.
enable_end_time This property is required. str
The start timestamp of the alert blacklist policy.Unit: milliseconds.
enable_start_time This property is required. str
The end timestamp of the alert blacklist policy.Unit: milliseconds.
id This property is required. str
instances This property is required. Sequence[str]
The list of instances of cloud services specified in the alert blacklist policy.
is_enable This property is required. bool
The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
metric_rule_black_list_id This property is required. str
The first ID of the resource
metric_rule_black_list_name This property is required. str
The name of the alert blacklist policy.
metrics This property is required. Sequence[GetMetricRuleBlackListsListMetric]
Monitoring metrics in the instance.
namespace This property is required. str
The data namespace of the cloud service.
scope_type This property is required. str
The effective range of the alert blacklist policy. Value:-USER: The alert blacklist policy only takes effect in the current Alibaba cloud account.-GROUP: The alert blacklist policy takes effect in the specified application GROUP.
scope_values This property is required. Sequence[str]
Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
category This property is required. String
Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
createTime This property is required. String
The timestamp for creating an alert blacklist policy.Unit: milliseconds.
effectiveTime This property is required. String
The effective time range of the alert blacklist policy.
enableEndTime This property is required. String
The start timestamp of the alert blacklist policy.Unit: milliseconds.
enableStartTime This property is required. String
The end timestamp of the alert blacklist policy.Unit: milliseconds.
id This property is required. String
instances This property is required. List<String>
The list of instances of cloud services specified in the alert blacklist policy.
isEnable This property is required. Boolean
The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
metricRuleBlackListId This property is required. String
The first ID of the resource
metricRuleBlackListName This property is required. String
The name of the alert blacklist policy.
metrics This property is required. List<Property Map>
Monitoring metrics in the instance.
namespace This property is required. String
The data namespace of the cloud service.
scopeType This property is required. String
The effective range of the alert blacklist policy. Value:-USER: The alert blacklist policy only takes effect in the current Alibaba cloud account.-GROUP: The alert blacklist policy takes effect in the specified application GROUP.
scopeValues This property is required. List<String>
Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.

GetMetricRuleBlackListsListMetric

MetricName This property is required. string
The name of the monitoring indicator.
Resource This property is required. string
The extended dimension information of the instance. For example, '{"device":"C:"}' indicates that the blacklist policy is applied to all C disks under the ECS instance.
MetricName This property is required. string
The name of the monitoring indicator.
Resource This property is required. string
The extended dimension information of the instance. For example, '{"device":"C:"}' indicates that the blacklist policy is applied to all C disks under the ECS instance.
metricName This property is required. String
The name of the monitoring indicator.
resource This property is required. String
The extended dimension information of the instance. For example, '{"device":"C:"}' indicates that the blacklist policy is applied to all C disks under the ECS instance.
metricName This property is required. string
The name of the monitoring indicator.
resource This property is required. string
The extended dimension information of the instance. For example, '{"device":"C:"}' indicates that the blacklist policy is applied to all C disks under the ECS instance.
metric_name This property is required. str
The name of the monitoring indicator.
resource This property is required. str
The extended dimension information of the instance. For example, '{"device":"C:"}' indicates that the blacklist policy is applied to all C disks under the ECS instance.
metricName This property is required. String
The name of the monitoring indicator.
resource This property is required. String
The extended dimension information of the instance. For example, '{"device":"C:"}' indicates that the blacklist policy is applied to all C disks under the ECS instance.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.