forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOr.py
18 lines (15 loc) · 709 Bytes
/
Or.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules.conditions.common import check_condition_list
class Or(CloudFormationLintRule):
"""Check Or Condition Function Logic"""
id = 'E8006'
shortdesc = 'Check Fn::Or structure for validity'
description = 'Check Fn::Or is a list of two elements'
source_url = 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-or'
tags = ['functions', 'or']
def match(self, cfn):
return check_condition_list(cfn, 'Fn::Or')