CloudFormationStackNotificationCheck
- class aws_cdk.aws_config.CloudFormationStackNotificationCheck(scope, id, *, topics=None, config_rule_name=None, description=None, evaluation_modes=None, input_parameters=None, maximum_execution_frequency=None, rule_scope=None)
- Bases: - ManagedRule- Checks whether your CloudFormation stacks are sending event notifications to a SNS topic. - Optionally checks whether specified SNS topics are used. - See:
- Resource:
- AWS::Config::ConfigRule 
- ExampleMetadata:
- infused 
 - Example: - # topics to which CloudFormation stacks may send event notifications topic1 = sns.Topic(self, "AllowedTopic1") topic2 = sns.Topic(self, "AllowedTopic2") # non-compliant if CloudFormation stack does not send notifications to 'topic1' or 'topic2' config.CloudFormationStackNotificationCheck(self, "NotificationCheck", topics=[topic1, topic2] ) - Parameters:
- scope ( - Construct)
- id ( - str)
- topics ( - Optional[- Sequence[- ITopic]]) – A list of allowed topics. At most 5 topics. Default: - No topics.
- config_rule_name ( - Optional[- str]) – A name for the AWS Config rule. Default: - CloudFormation generated name
- description ( - Optional[- str]) – A description about this AWS Config rule. Default: - No description
- evaluation_modes ( - Optional[- EvaluationMode]) – The modes the AWS Config rule can be evaluated in. The valid values are distinct objects. Default: - Detective evaluation mode only
- input_parameters ( - Optional[- Mapping[- str,- Any]]) – Input parameter values that are passed to the AWS Config rule. Default: - No input parameters
- maximum_execution_frequency ( - Optional[- MaximumExecutionFrequency]) – The maximum frequency at which the AWS Config rule runs evaluations. Default: MaximumExecutionFrequency.TWENTY_FOUR_HOURS
- rule_scope ( - Optional[- RuleScope]) – Defines which resources trigger an evaluation for an AWS Config rule. Default: - evaluations for the rule are triggered when any resource in the recording group changes.
 
 - Methods - apply_removal_policy(policy)
- Apply the given removal policy to this resource. - The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced. - The resource can be deleted ( - RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (- RemovalPolicy.RETAIN).- Parameters:
- policy ( - RemovalPolicy)
- Return type:
- None
 
 - on_compliance_change(id, *, target=None, cross_stack_scope=None, description=None, event_pattern=None, rule_name=None)
- Defines an EventBridge event rule which triggers for rule compliance events. - Parameters:
- id ( - str)
- target ( - Optional[- IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use- addTarget()to add a target.
- cross_stack_scope ( - Optional[- Construct]) – The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). This helps dealing with cycles that often arise in these situations. Default: - none (the main scope will be used, even for cross-stack Events)
- description ( - Optional[- str]) – A description of the rule’s purpose. Default: - No description
- event_pattern ( - Union[- EventPattern,- Dict[- str,- Any],- None]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.
- rule_name ( - Optional[- str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
 
- Return type:
 
 - on_event(id, *, target=None, cross_stack_scope=None, description=None, event_pattern=None, rule_name=None)
- Defines an EventBridge event rule which triggers for rule events. - Use - rule.addEventPattern(pattern)to specify a filter.- Parameters:
- id ( - str)
- target ( - Optional[- IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use- addTarget()to add a target.
- cross_stack_scope ( - Optional[- Construct]) – The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). This helps dealing with cycles that often arise in these situations. Default: - none (the main scope will be used, even for cross-stack Events)
- description ( - Optional[- str]) – A description of the rule’s purpose. Default: - No description
- event_pattern ( - Union[- EventPattern,- Dict[- str,- Any],- None]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.
- rule_name ( - Optional[- str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
 
- Return type:
 
 - on_re_evaluation_status(id, *, target=None, cross_stack_scope=None, description=None, event_pattern=None, rule_name=None)
- Defines an EventBridge event rule which triggers for rule re-evaluation status events. - Parameters:
- id ( - str)
- target ( - Optional[- IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use- addTarget()to add a target.
- cross_stack_scope ( - Optional[- Construct]) – The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). This helps dealing with cycles that often arise in these situations. Default: - none (the main scope will be used, even for cross-stack Events)
- description ( - Optional[- str]) – A description of the rule’s purpose. Default: - No description
- event_pattern ( - Union[- EventPattern,- Dict[- str,- Any],- None]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.
- rule_name ( - Optional[- str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
 
- Return type:
 
 - to_string()
- Returns a string representation of this construct. - Return type:
- str
 
 - Attributes - PROPERTY_INJECTION_ID = 'aws-cdk-lib.aws-config.CloudFormationStackNotificationCheck'
 - config_rule_arn
- The arn of the rule. - Attribute:
- true 
 
 - config_rule_compliance_type
- The compliance status of the rule. - Attribute:
- true 
 
 - config_rule_id
- The id of the rule. - Attribute:
- true 
 
 - config_rule_name
- The name of the rule. - Attribute:
- true 
 
 - env
- The environment this resource belongs to. - For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into. 
 - node
- The tree node. 
 - stack
- The stack in which this resource is defined. 
 - Static Methods - classmethod from_config_rule_name(scope, id, config_rule_name)
- Imports an existing rule. 
 - classmethod is_construct(x)
- Checks if - xis a construct.- Use this method instead of - instanceofto properly detect- Constructinstances, even when the construct library is symlinked.- Explanation: in JavaScript, multiple copies of the - constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the class- Constructin each copy of the- constructslibrary is seen as a different class, and an instance of one class will not test as- instanceofthe other class.- npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the- constructslibrary can be accidentally installed, and- instanceofwill behave unpredictably. It is safest to avoid using- instanceof, and using this type-testing method instead.- Parameters:
- x ( - Any) – Any object.
- Return type:
- bool
- Returns:
- true if - xis an object created from a class which extends- Construct.
 
 - classmethod is_owned_resource(construct)
- Returns true if the construct was created by CDK, and false otherwise. - Parameters:
- construct ( - IConstruct)
- Return type:
- bool
 
 - classmethod is_resource(construct)
- Check whether the given construct is a Resource. - Parameters:
- construct ( - IConstruct)
- Return type:
- bool