fnmatch

A Python module that tests whether a string matches a shell-style wildcard pattern, such as s3:Get* matching s3:GetObject.

In more detail

fnmatch follows the operating system's case rules, while fnmatchcase always compares case-sensitively. The patterns are simpler than regular expressions: an asterisk, a question mark and bracketed character sets.

Example

Policy evaluators can use fnmatchcase to imitate how IAM matches actions and resources with wildcards

Related terms

Taught in

References