def _addMethod(self, effect, verb, resource, conditions):
if verb != '<STR_LIT:*>' and not hasattr(HttpVerb, verb):<EOL><INDENT>raise NameError('<STR_LIT>' + verb + '<STR_LIT>')<EOL><DEDENT>resourcePattern = re.compile(self.pathRegex)<EOL>if not resourcePattern.match(resource):<EOL><INDENT>raise NameError('<STR_LIT>' + resource + '<STR_LIT>' + self.pathRegex)<EOL><DEDENT>if resource[:<NUM_LIT:1>] == '<STR_LIT:/>':<EOL><INDENT>resource = resource[<NUM_LIT:1>:]<EOL><DEDENT>resourceArn = '<STR_LIT>'.format(self.region, self.awsAccountId, self.restApiId, self.stage, verb, resource)<EOL>if effect.lower() == '<STR_LIT>':<EOL><INDENT>self.allowMethods.append({<EOL>'<STR_LIT>': resourceArn,<EOL>'<STR_LIT>': conditions<EOL>})<EOL><DEDENT>elif effect.lower() == '<STR_LIT>':<EOL><INDENT>self.denyMethods.append({<EOL>'<STR_LIT>': resourceArn,<EOL>'<STR_LIT>': conditions<EOL>})<EOL><DEDENT>
Adds a method to the internal lists of allowed or denied methods. Each object in
        the internal list contains a resource ARN and a condition statement. The condition
        statement can be null.