1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. MetricRuleBlackList
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cms.MetricRuleBlackList

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Cloud Monitor Service Metric Rule Black List resource.

    For information about Cloud Monitor Service Metric Rule Black List and how to use it, see What is Metric Rule Black List.

    NOTE: Available since v1.194.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") || "tf-example";
    const default = alicloud.getZones({
        availableResourceCreation: "Instance",
    });
    const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
        availabilityZone: _default.zones?.[0]?.id,
        cpuCoreCount: 1,
        memorySize: 2,
    }));
    const defaultGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_18.*64",
        owners: "system",
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultInstance = new alicloud.ecs.Instance("default", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        instanceName: name,
        imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
        instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
        securityGroups: [defaultSecurityGroup.id],
        vswitchId: defaultSwitch.id,
    });
    const defaultMetricRuleBlackList = new alicloud.cms.MetricRuleBlackList("default", {
        instances: [pulumi.interpolate`{"instancceId":"${defaultInstance.id}"}`],
        metrics: [{
            metricName: "disk_utilization",
        }],
        category: "ecs",
        enableEndTime: "1799443209000",
        namespace: "acs_ecs_dashboard",
        enableStartTime: "1689243209000",
        metricRuleBlackListName: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.get_zones(available_resource_creation="Instance")
    default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
        cpu_core_count=1,
        memory_size=2)
    default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
        owners="system")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("default",
        availability_zone=default.zones[0].id,
        instance_name=name,
        image_id=default_get_images.images[0].id,
        instance_type=default_get_instance_types.instance_types[0].id,
        security_groups=[default_security_group.id],
        vswitch_id=default_switch.id)
    default_metric_rule_black_list = alicloud.cms.MetricRuleBlackList("default",
        instances=[default_instance.id.apply(lambda id: f"{{\"instancceId\":\"{id}\"}}")],
        metrics=[{
            "metric_name": "disk_utilization",
        }],
        category="ecs",
        enable_end_time="1799443209000",
        namespace="acs_ecs_dashboard",
        enable_start_time="1689243209000",
        metric_rule_black_list_name=name)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"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 := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Instance"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(1),
    			MemorySize:       pulumi.Float64Ref(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
    			Owners:    pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			InstanceName:     pulumi.String(name),
    			ImageId:          pulumi.String(defaultGetImages.Images[0].Id),
    			InstanceType:     pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
    			SecurityGroups: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    			VswitchId: defaultSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cms.NewMetricRuleBlackList(ctx, "default", &cms.MetricRuleBlackListArgs{
    			Instances: pulumi.StringArray{
    				defaultInstance.ID().ApplyT(func(id string) (string, error) {
    					return fmt.Sprintf("{\"instancceId\":\"%v\"}", id), nil
    				}).(pulumi.StringOutput),
    			},
    			Metrics: cms.MetricRuleBlackListMetricArray{
    				&cms.MetricRuleBlackListMetricArgs{
    					MetricName: pulumi.String("disk_utilization"),
    				},
    			},
    			Category:                pulumi.String("ecs"),
    			EnableEndTime:           pulumi.String("1799443209000"),
    			Namespace:               pulumi.String("acs_ecs_dashboard"),
    			EnableStartTime:         pulumi.String("1689243209000"),
    			MetricRuleBlackListName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		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") ?? "tf-example";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Instance",
        });
    
        var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 1,
            MemorySize = 2,
        });
    
        var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_18.*64",
            Owners = "system",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("default", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            InstanceName = name,
            ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroups = new[]
            {
                defaultSecurityGroup.Id,
            },
            VswitchId = defaultSwitch.Id,
        });
    
        var defaultMetricRuleBlackList = new AliCloud.Cms.MetricRuleBlackList("default", new()
        {
            Instances = new[]
            {
                defaultInstance.Id.Apply(id => $"{{\"instancceId\":\"{id}\"}}"),
            },
            Metrics = new[]
            {
                new AliCloud.Cms.Inputs.MetricRuleBlackListMetricArgs
                {
                    MetricName = "disk_utilization",
                },
            },
            Category = "ecs",
            EnableEndTime = "1799443209000",
            Namespace = "acs_ecs_dashboard",
            EnableStartTime = "1689243209000",
            MetricRuleBlackListName = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.cms.MetricRuleBlackList;
    import com.pulumi.alicloud.cms.MetricRuleBlackListArgs;
    import com.pulumi.alicloud.cms.inputs.MetricRuleBlackListMetricArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Instance")
                .build());
    
            final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .cpuCoreCount(1)
                .memorySize(2)
                .build());
    
            final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_18.*64")
                .owners("system")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(default_.zones()[0].id())
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .instanceName(name)
                .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .securityGroups(defaultSecurityGroup.id())
                .vswitchId(defaultSwitch.id())
                .build());
    
            var defaultMetricRuleBlackList = new MetricRuleBlackList("defaultMetricRuleBlackList", MetricRuleBlackListArgs.builder()
                .instances(defaultInstance.id().applyValue(id -> String.format("{{\"instancceId\":\"%s\"}}", id)))
                .metrics(MetricRuleBlackListMetricArgs.builder()
                    .metricName("disk_utilization")
                    .build())
                .category("ecs")
                .enableEndTime(1799443209000)
                .namespace("acs_ecs_dashboard")
                .enableStartTime(1689243209000)
                .metricRuleBlackListName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${default.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:ecs:Instance
        name: default
        properties:
          availabilityZone: ${default.zones[0].id}
          instanceName: ${name}
          imageId: ${defaultGetImages.images[0].id}
          instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
          securityGroups:
            - ${defaultSecurityGroup.id}
          vswitchId: ${defaultSwitch.id}
      defaultMetricRuleBlackList:
        type: alicloud:cms:MetricRuleBlackList
        name: default
        properties:
          instances:
            - '{"instancceId":"${defaultInstance.id}"}'
          metrics:
            - metricName: disk_utilization
          category: ecs
          enableEndTime: 1.799443209e+12
          namespace: acs_ecs_dashboard
          enableStartTime: 1.689243209e+12
          metricRuleBlackListName: ${name}
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Instance
      defaultGetInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${default.zones[0].id}
            cpuCoreCount: 1
            memorySize: 2
      defaultGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_18.*64
            owners: system
    

    Create MetricRuleBlackList Resource

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

    Constructor syntax

    new MetricRuleBlackList(name: string, args: MetricRuleBlackListArgs, opts?: CustomResourceOptions);
    @overload
    def MetricRuleBlackList(resource_name: str,
                            args: MetricRuleBlackListArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricRuleBlackList(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            category: Optional[str] = None,
                            instances: Optional[Sequence[str]] = None,
                            metric_rule_black_list_name: Optional[str] = None,
                            namespace: Optional[str] = None,
                            effective_time: Optional[str] = None,
                            enable_end_time: Optional[str] = None,
                            enable_start_time: Optional[str] = None,
                            is_enable: Optional[bool] = None,
                            metrics: Optional[Sequence[MetricRuleBlackListMetricArgs]] = None,
                            scope_type: Optional[str] = None,
                            scope_values: Optional[Sequence[str]] = None)
    func NewMetricRuleBlackList(ctx *Context, name string, args MetricRuleBlackListArgs, opts ...ResourceOption) (*MetricRuleBlackList, error)
    public MetricRuleBlackList(string name, MetricRuleBlackListArgs args, CustomResourceOptions? opts = null)
    public MetricRuleBlackList(String name, MetricRuleBlackListArgs args)
    public MetricRuleBlackList(String name, MetricRuleBlackListArgs args, CustomResourceOptions options)
    
    type: alicloud:cms:MetricRuleBlackList
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MetricRuleBlackListArgs
    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 MetricRuleBlackListArgs
    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 MetricRuleBlackListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricRuleBlackListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricRuleBlackListArgs
    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 metricRuleBlackListResource = new AliCloud.Cms.MetricRuleBlackList("metricRuleBlackListResource", new()
    {
        Category = "string",
        Instances = new[]
        {
            "string",
        },
        MetricRuleBlackListName = "string",
        Namespace = "string",
        EffectiveTime = "string",
        EnableEndTime = "string",
        EnableStartTime = "string",
        IsEnable = false,
        Metrics = new[]
        {
            new AliCloud.Cms.Inputs.MetricRuleBlackListMetricArgs
            {
                MetricName = "string",
                Resource = "string",
            },
        },
        ScopeType = "string",
        ScopeValues = new[]
        {
            "string",
        },
    });
    
    example, err := cms.NewMetricRuleBlackList(ctx, "metricRuleBlackListResource", &cms.MetricRuleBlackListArgs{
    	Category: pulumi.String("string"),
    	Instances: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	MetricRuleBlackListName: pulumi.String("string"),
    	Namespace:               pulumi.String("string"),
    	EffectiveTime:           pulumi.String("string"),
    	EnableEndTime:           pulumi.String("string"),
    	EnableStartTime:         pulumi.String("string"),
    	IsEnable:                pulumi.Bool(false),
    	Metrics: cms.MetricRuleBlackListMetricArray{
    		&cms.MetricRuleBlackListMetricArgs{
    			MetricName: pulumi.String("string"),
    			Resource:   pulumi.String("string"),
    		},
    	},
    	ScopeType: pulumi.String("string"),
    	ScopeValues: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var metricRuleBlackListResource = new MetricRuleBlackList("metricRuleBlackListResource", MetricRuleBlackListArgs.builder()
        .category("string")
        .instances("string")
        .metricRuleBlackListName("string")
        .namespace("string")
        .effectiveTime("string")
        .enableEndTime("string")
        .enableStartTime("string")
        .isEnable(false)
        .metrics(MetricRuleBlackListMetricArgs.builder()
            .metricName("string")
            .resource("string")
            .build())
        .scopeType("string")
        .scopeValues("string")
        .build());
    
    metric_rule_black_list_resource = alicloud.cms.MetricRuleBlackList("metricRuleBlackListResource",
        category="string",
        instances=["string"],
        metric_rule_black_list_name="string",
        namespace="string",
        effective_time="string",
        enable_end_time="string",
        enable_start_time="string",
        is_enable=False,
        metrics=[{
            "metric_name": "string",
            "resource": "string",
        }],
        scope_type="string",
        scope_values=["string"])
    
    const metricRuleBlackListResource = new alicloud.cms.MetricRuleBlackList("metricRuleBlackListResource", {
        category: "string",
        instances: ["string"],
        metricRuleBlackListName: "string",
        namespace: "string",
        effectiveTime: "string",
        enableEndTime: "string",
        enableStartTime: "string",
        isEnable: false,
        metrics: [{
            metricName: "string",
            resource: "string",
        }],
        scopeType: "string",
        scopeValues: ["string"],
    });
    
    type: alicloud:cms:MetricRuleBlackList
    properties:
        category: string
        effectiveTime: string
        enableEndTime: string
        enableStartTime: string
        instances:
            - string
        isEnable: false
        metricRuleBlackListName: string
        metrics:
            - metricName: string
              resource: string
        namespace: string
        scopeType: string
        scopeValues:
            - string
    

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

    Category string
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    Instances List<string>
    The list of instances of cloud services specified in the alert blacklist policy.
    MetricRuleBlackListName string
    The name of the alert blacklist policy.
    Namespace string
    The data namespace of the cloud service.
    EffectiveTime string
    The effective time range of the alert blacklist policy.
    EnableEndTime string
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    EnableStartTime string
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    IsEnable bool
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    Metrics List<Pulumi.AliCloud.Cms.Inputs.MetricRuleBlackListMetric>
    Monitoring metrics in the instance. See metrics below.
    ScopeType 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 List<string>
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    Category string
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    Instances []string
    The list of instances of cloud services specified in the alert blacklist policy.
    MetricRuleBlackListName string
    The name of the alert blacklist policy.
    Namespace string
    The data namespace of the cloud service.
    EffectiveTime string
    The effective time range of the alert blacklist policy.
    EnableEndTime string
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    EnableStartTime string
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    IsEnable bool
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    Metrics []MetricRuleBlackListMetricArgs
    Monitoring metrics in the instance. See metrics below.
    ScopeType 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 []string
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    category String
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    instances List<String>
    The list of instances of cloud services specified in the alert blacklist policy.
    metricRuleBlackListName String
    The name of the alert blacklist policy.
    namespace String
    The data namespace of the cloud service.
    effectiveTime String
    The effective time range of the alert blacklist policy.
    enableEndTime String
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enableStartTime String
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    isEnable Boolean
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metrics List<MetricRuleBlackListMetric>
    Monitoring metrics in the instance. See metrics below.
    scopeType 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 List<String>
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    category string
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    instances string[]
    The list of instances of cloud services specified in the alert blacklist policy.
    metricRuleBlackListName string
    The name of the alert blacklist policy.
    namespace string
    The data namespace of the cloud service.
    effectiveTime string
    The effective time range of the alert blacklist policy.
    enableEndTime string
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enableStartTime string
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    isEnable boolean
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metrics MetricRuleBlackListMetric[]
    Monitoring metrics in the instance. See metrics below.
    scopeType 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 string[]
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    category str
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    instances Sequence[str]
    The list of instances of cloud services specified in the alert blacklist policy.
    metric_rule_black_list_name str
    The name of the alert blacklist policy.
    namespace str
    The data namespace of the cloud service.
    effective_time str
    The effective time range of the alert blacklist policy.
    enable_end_time str
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enable_start_time str
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    is_enable bool
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metrics Sequence[MetricRuleBlackListMetricArgs]
    Monitoring metrics in the instance. See metrics below.
    scope_type 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 Sequence[str]
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    category String
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    instances List<String>
    The list of instances of cloud services specified in the alert blacklist policy.
    metricRuleBlackListName String
    The name of the alert blacklist policy.
    namespace String
    The data namespace of the cloud service.
    effectiveTime String
    The effective time range of the alert blacklist policy.
    enableEndTime String
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enableStartTime String
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    isEnable Boolean
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metrics List<Property Map>
    Monitoring metrics in the instance. See metrics below.
    scopeType 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 List<String>
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.

    Outputs

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

    CreateTime string
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    MetricRuleBlackListId string
    The ID of the blacklist policy.
    UpdateTime string
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    CreateTime string
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    MetricRuleBlackListId string
    The ID of the blacklist policy.
    UpdateTime string
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    createTime String
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    id String
    The provider-assigned unique ID for this managed resource.
    metricRuleBlackListId String
    The ID of the blacklist policy.
    updateTime String
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    createTime string
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    id string
    The provider-assigned unique ID for this managed resource.
    metricRuleBlackListId string
    The ID of the blacklist policy.
    updateTime string
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    create_time str
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    id str
    The provider-assigned unique ID for this managed resource.
    metric_rule_black_list_id str
    The ID of the blacklist policy.
    update_time str
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    createTime String
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    id String
    The provider-assigned unique ID for this managed resource.
    metricRuleBlackListId String
    The ID of the blacklist policy.
    updateTime String
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.

    Look up Existing MetricRuleBlackList Resource

    Get an existing MetricRuleBlackList 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?: MetricRuleBlackListState, opts?: CustomResourceOptions): MetricRuleBlackList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            create_time: Optional[str] = None,
            effective_time: Optional[str] = None,
            enable_end_time: Optional[str] = None,
            enable_start_time: Optional[str] = None,
            instances: Optional[Sequence[str]] = None,
            is_enable: Optional[bool] = None,
            metric_rule_black_list_id: Optional[str] = None,
            metric_rule_black_list_name: Optional[str] = None,
            metrics: Optional[Sequence[MetricRuleBlackListMetricArgs]] = None,
            namespace: Optional[str] = None,
            scope_type: Optional[str] = None,
            scope_values: Optional[Sequence[str]] = None,
            update_time: Optional[str] = None) -> MetricRuleBlackList
    func GetMetricRuleBlackList(ctx *Context, name string, id IDInput, state *MetricRuleBlackListState, opts ...ResourceOption) (*MetricRuleBlackList, error)
    public static MetricRuleBlackList Get(string name, Input<string> id, MetricRuleBlackListState? state, CustomResourceOptions? opts = null)
    public static MetricRuleBlackList get(String name, Output<String> id, MetricRuleBlackListState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Category string
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    CreateTime string
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    EffectiveTime string
    The effective time range of the alert blacklist policy.
    EnableEndTime string
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    EnableStartTime string
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    Instances List<string>
    The list of instances of cloud services specified in the alert blacklist policy.
    IsEnable bool
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    MetricRuleBlackListId string
    The ID of the blacklist policy.
    MetricRuleBlackListName string
    The name of the alert blacklist policy.
    Metrics List<Pulumi.AliCloud.Cms.Inputs.MetricRuleBlackListMetric>
    Monitoring metrics in the instance. See metrics below.
    Namespace string
    The data namespace of the cloud service.
    ScopeType 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 List<string>
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    UpdateTime string
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    Category string
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    CreateTime string
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    EffectiveTime string
    The effective time range of the alert blacklist policy.
    EnableEndTime string
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    EnableStartTime string
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    Instances []string
    The list of instances of cloud services specified in the alert blacklist policy.
    IsEnable bool
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    MetricRuleBlackListId string
    The ID of the blacklist policy.
    MetricRuleBlackListName string
    The name of the alert blacklist policy.
    Metrics []MetricRuleBlackListMetricArgs
    Monitoring metrics in the instance. See metrics below.
    Namespace string
    The data namespace of the cloud service.
    ScopeType 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 []string
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    UpdateTime string
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    category String
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    createTime String
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    effectiveTime String
    The effective time range of the alert blacklist policy.
    enableEndTime String
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enableStartTime String
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    instances List<String>
    The list of instances of cloud services specified in the alert blacklist policy.
    isEnable Boolean
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metricRuleBlackListId String
    The ID of the blacklist policy.
    metricRuleBlackListName String
    The name of the alert blacklist policy.
    metrics List<MetricRuleBlackListMetric>
    Monitoring metrics in the instance. See metrics below.
    namespace String
    The data namespace of the cloud service.
    scopeType 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 List<String>
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    updateTime String
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    category string
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    createTime string
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    effectiveTime string
    The effective time range of the alert blacklist policy.
    enableEndTime string
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enableStartTime string
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    instances string[]
    The list of instances of cloud services specified in the alert blacklist policy.
    isEnable boolean
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metricRuleBlackListId string
    The ID of the blacklist policy.
    metricRuleBlackListName string
    The name of the alert blacklist policy.
    metrics MetricRuleBlackListMetric[]
    Monitoring metrics in the instance. See metrics below.
    namespace string
    The data namespace of the cloud service.
    scopeType 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 string[]
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    updateTime string
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    category str
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    create_time str
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    effective_time str
    The effective time range of the alert blacklist policy.
    enable_end_time str
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enable_start_time str
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    instances Sequence[str]
    The list of instances of cloud services specified in the alert blacklist policy.
    is_enable bool
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metric_rule_black_list_id str
    The ID of the blacklist policy.
    metric_rule_black_list_name str
    The name of the alert blacklist policy.
    metrics Sequence[MetricRuleBlackListMetricArgs]
    Monitoring metrics in the instance. See metrics below.
    namespace str
    The data namespace of the cloud service.
    scope_type 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 Sequence[str]
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    update_time str
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.
    category String
    Cloud service classification. For example, Redis includes kvstore_standard, kvstore_sharding, and kvstore_splitrw.
    createTime String
    The timestamp for creating an alert blacklist policy.Unit: milliseconds.
    effectiveTime String
    The effective time range of the alert blacklist policy.
    enableEndTime String
    The start timestamp of the alert blacklist policy.Unit: milliseconds.
    enableStartTime String
    The end timestamp of the alert blacklist policy.Unit: milliseconds.
    instances List<String>
    The list of instances of cloud services specified in the alert blacklist policy.
    isEnable Boolean
    The status of the alert blacklist policy. Value:-true: enabled.-false: disabled.
    metricRuleBlackListId String
    The ID of the blacklist policy.
    metricRuleBlackListName String
    The name of the alert blacklist policy.
    metrics List<Property Map>
    Monitoring metrics in the instance. See metrics below.
    namespace String
    The data namespace of the cloud service.
    scopeType 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 List<String>
    Application Group ID list. The format is JSON Array.> This parameter is displayed only when 'ScopeType' is 'GROUP.
    updateTime String
    Modify the timestamp of the alert blacklist policy.Unit: milliseconds.

    Supporting Types

    MetricRuleBlackListMetric, MetricRuleBlackListMetricArgs

    MetricName string
    The name of the monitoring indicator.
    Resource 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 string
    The name of the monitoring indicator.
    Resource 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 String
    The name of the monitoring indicator.
    resource 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 string
    The name of the monitoring indicator.
    resource 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 str
    The name of the monitoring indicator.
    resource 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 String
    The name of the monitoring indicator.
    resource 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.

    Import

    Cloud Monitor Service Metric Rule Black List can be imported using the id, e.g.

    $ pulumi import alicloud:cms/metricRuleBlackList:MetricRuleBlackList example <id>
    

    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
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi