Rule
This class encapsulates and extends the ROS resource type ALIYUN::Config::Rule
, which is used to create or modify a rule.
Initializers
import ros_cdk_config
ros_cdk_config.Rule(
scope: Construct,
id: str,
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,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No 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. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
config_rule_trigger_types
Required
- 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_scope
Required
- 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_level
Required
- 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_name
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ruleName: The name of the rule.
source_identifier
Required
- 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_owner
Required
- 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
description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: The description of the rule.
exclude_resource_ids_scope
Optional
- 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_parameters
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]
Property inputParameters: The settings of the input parameters for the rule.
maximum_execution_frequency
Optional
- 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_scope
Optional
- 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_scope
Optional
- 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_scope
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property tagKeyLogicScope:.
tag_key_scope
Optional
- 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_scope
Optional
- 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.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_config
ros_cdk_config.Rule.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_config_rule_arn |
ros_cdk_core.IResolvable |
Attribute ConfigRuleArn: config rule arn. |
attr_config_rule_id |
ros_cdk_core.IResolvable |
Attribute ConfigRuleId: The ID of the rule. |
attr_config_rule_trigger_types |
ros_cdk_core.IResolvable |
Attribute ConfigRuleTriggerTypes: The trigger type of the rule. |
attr_description |
ros_cdk_core.IResolvable |
Attribute Description: The description of the rule. |
attr_event_source |
ros_cdk_core.IResolvable |
Attribute EventSource: The event source of the rule. |
attr_exclude_resource_ids_scope |
ros_cdk_core.IResolvable |
Attribute 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. |
attr_input_parameters |
ros_cdk_core.IResolvable |
Attribute InputParameters: The settings of the input parameters for the rule. |
attr_maximum_execution_frequency |
ros_cdk_core.IResolvable |
Attribute MaximumExecutionFrequency: The frequency of the compliance evaluations. |
attr_region_ids_scope |
ros_cdk_core.IResolvable |
Attribute RegionIdsScope: The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules. |
attr_resource_group_ids_scope |
ros_cdk_core.IResolvable |
Attribute ResourceGroupIdsScope: The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules. |
attr_resource_types_scope |
ros_cdk_core.IResolvable |
Attribute ResourceTypesScope: The types of the resources to be evaluated against the rule. |
attr_risk_level |
ros_cdk_core.IResolvable |
Attribute RiskLevel: The risk level of the resources that are not compliant with the rule. |
attr_rule_name |
ros_cdk_core.IResolvable |
Attribute RuleName: The name of the rule. |
attr_source_identifier |
ros_cdk_core.IResolvable |
Attribute SourceIdentifier: The identifier of the rule. |
attr_source_owner |
ros_cdk_core.IResolvable |
Attribute SourceOwner: Specifies whether you or Alibaba Cloud owns and manages the rule. |
attr_tag_key_scope |
ros_cdk_core.IResolvable |
Attribute TagKeyScope: The rule monitors the tag key, only applies to rules created based on managed rules. |
attr_tag_value_scope |
ros_cdk_core.IResolvable |
Attribute TagValueScope: The rule monitors the tag value, only applies to rules created based on managed rules. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_config_rule_arn
Required
attr_config_rule_arn: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ConfigRuleArn: config rule arn.
attr_config_rule_id
Required
attr_config_rule_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ConfigRuleId: The ID of the rule.
attr_config_rule_trigger_types
Required
attr_config_rule_trigger_types: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ConfigRuleTriggerTypes: The trigger type of the rule.
Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
attr_description
Required
attr_description: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Description: The description of the rule.
attr_event_source
Required
attr_event_source: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute EventSource: The event source of the rule.
attr_exclude_resource_ids_scope
Required
attr_exclude_resource_ids_scope: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute 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.
attr_input_parameters
Required
attr_input_parameters: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InputParameters: The settings of the input parameters for the rule.
attr_maximum_execution_frequency
Required
attr_maximum_execution_frequency: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute MaximumExecutionFrequency: The frequency of the compliance evaluations.
Valid values: One_Hour Three_Hours Six_Hours Twelve_Hours TwentyFour_Hours
attr_region_ids_scope
Required
attr_region_ids_scope: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute RegionIdsScope: The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
attr_resource_group_ids_scope
Required
attr_resource_group_ids_scope: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ResourceGroupIdsScope: The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
attr_resource_types_scope
Required
attr_resource_types_scope: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ResourceTypesScope: The types of the resources to be evaluated against the rule.
attr_risk_level
Required
attr_risk_level: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute RiskLevel: The risk level of the resources that are not compliant with the rule.
Valid values: 1: critical 2: warning 3: info
attr_rule_name
Required
attr_rule_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute RuleName: The name of the rule.
attr_source_identifier
Required
attr_source_identifier: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute 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
attr_source_owner
Required
attr_source_owner: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute 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
attr_tag_key_scope
Required
attr_tag_key_scope: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute TagKeyScope: The rule monitors the tag key, only applies to rules created based on managed rules.
attr_tag_value_scope
Required
attr_tag_value_scope: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute TagValueScope: The rule monitors the tag value, only applies to rules created based on managed rules.