Skip to content

RuleProps

Properties for defining a Rule.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-config-rule

Initializer

import ros_cdk_config
ros_cdk_config.RuleProps(
  config_rule_trigger_types: typing.Union[str, IResolvable],
  resource_types_scope: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]],
  risk_level: typing.Union[typing.Union[int, float], IResolvable],
  rule_name: typing.Union[str, IResolvable],
  source_identifier: typing.Union[str, IResolvable],
  source_owner: typing.Union[str, IResolvable],
  description: typing.Union[str, IResolvable] = None,
  exclude_resource_ids_scope: typing.Union[str, IResolvable] = None,
  input_parameters: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None,
  maximum_execution_frequency: typing.Union[str, IResolvable] = None,
  region_ids_scope: typing.Union[str, IResolvable] = None,
  resource_group_ids_scope: typing.Union[str, IResolvable] = None,
  tag_key_logic_scope: typing.Union[str, IResolvable] = None,
  tag_key_scope: typing.Union[str, IResolvable] = None,
  tag_value_scope: typing.Union[str, IResolvable] = None
)

Properties

Name Type Description
config_rule_trigger_types typing.Union[str, ros_cdk_core.IResolvable] Property configRuleTriggerTypes: The trigger type of the rule.
resource_types_scope typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] Property resourceTypesScope: The types of the resources to be evaluated against the rule.
risk_level typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property riskLevel: The risk level of the resources that are not compliant with the rule.
rule_name typing.Union[str, ros_cdk_core.IResolvable] Property ruleName: The name of the rule.
source_identifier typing.Union[str, ros_cdk_core.IResolvable] Property sourceIdentifier: The identifier of the rule.
source_owner typing.Union[str, ros_cdk_core.IResolvable] Property sourceOwner: Specifies whether you or Alibaba Cloud owns and manages the rule.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: The description of the rule.
exclude_resource_ids_scope typing.Union[str, ros_cdk_core.IResolvable] Property excludeResourceIdsScope: The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
input_parameters typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] Property inputParameters: The settings of the input parameters for the rule.
maximum_execution_frequency typing.Union[str, ros_cdk_core.IResolvable] Property maximumExecutionFrequency: The frequency of the compliance evaluations.
region_ids_scope typing.Union[str, ros_cdk_core.IResolvable] Property regionIdsScope: The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resource_group_ids_scope typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupIdsScope: The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
tag_key_logic_scope typing.Union[str, ros_cdk_core.IResolvable] Property tagKeyLogicScope:.
tag_key_scope typing.Union[str, ros_cdk_core.IResolvable] Property tagKeyScope: The rule monitors the tag key, only applies to rules created based on managed rules.
tag_value_scope typing.Union[str, ros_cdk_core.IResolvable] Property tagValueScope: The rule monitors the tag value, only applies to rules created based on managed rules.

config_rule_trigger_typesRequired

config_rule_trigger_types: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property configRuleTriggerTypes: The trigger type of the rule.

Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.


resource_types_scopeRequired

resource_types_scope: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]

Property resourceTypesScope: The types of the resources to be evaluated against the rule.


risk_levelRequired

risk_level: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property riskLevel: The risk level of the resources that are not compliant with the rule.

Valid values: 1: critical 2: warning 3: info


rule_nameRequired

rule_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property ruleName: The name of the rule.


source_identifierRequired

source_identifier: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property sourceIdentifier: The identifier of the rule.

For a managed rule, the value is the name of the managed rule. For a custom rule, the value is the ARN of the custom rule


source_ownerRequired

source_owner: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property sourceOwner: Specifies whether you or Alibaba Cloud owns and manages the rule.

Valid values: CUSTOM_FC: The rule is a custom rule and you own the rule. ALIYUN: The rule is a managed rule and Alibaba Cloud owns the rule


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: The description of the rule.


exclude_resource_ids_scopeOptional

exclude_resource_ids_scope: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property excludeResourceIdsScope: The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.


input_parametersOptional

input_parameters: typing.Union[IResolvable, typing.Mapping[typing.Any]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]

Property inputParameters: The settings of the input parameters for the rule.


maximum_execution_frequencyOptional

maximum_execution_frequency: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property maximumExecutionFrequency: The frequency of the compliance evaluations.

Valid values: One_Hour Three_Hours Six_Hours Twelve_Hours TwentyFour_Hours


region_ids_scopeOptional

region_ids_scope: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property regionIdsScope: The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.


resource_group_ids_scopeOptional

resource_group_ids_scope: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupIdsScope: The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.


tag_key_logic_scopeOptional

tag_key_logic_scope: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property tagKeyLogicScope:.


tag_key_scopeOptional

tag_key_scope: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property tagKeyScope: The rule monitors the tag key, only applies to rules created based on managed rules.


tag_value_scopeOptional

tag_value_scope: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property tagValueScope: The rule monitors the tag value, only applies to rules created based on managed rules.