title: List RoleNames based on Action in AssumeRolePolicyDocument using boto3
body: <p>I am using below python code to list all the IAM Role Names.</p>
  <pre><code>from boto3 import Session
  import logging
  from botocore.exceptions import ClientError
  
  
  logger = logging.getLogger(__name__)
  
  
  def list_iam_roles(profile):
      boto_sess = Session(profile_name=profile)
      client = boto_sess.client('iam')
  
      roles = client.list_roles()
      for role in roles[&quot;Roles&quot;]:
          print (role[&quot;RoleName&quot;])
      return 
  
  list_iam_roles('some_profile')
  </code></pre>
  <p>It successfully returns the list of the all the IAM Role Names, but my requirement is to filter based on specific AssumeRolePolicyDocument.</p>
  <p>I want to filter Role Names which has <code>Action: sts:AssumeRoleWithSAML</code>.</p>
  <p>Any hints how can I filter it?</p>
  <p>The sample output of each role is pasted below. Ciphering some important information already with xxx.</p>
  <pre><code>{'Path': '/', 'RoleName': 'some_role_name', 'RoleId': 'some_id', 'Arn': 'arn:aws:iam::xxxxx:role/some_role_name', 'CreateDate': datetime.datetime(2021, 2, 14, 12, 49, 26, tzinfo=tzutc()), 'AssumeRolePolicyDocument': {'Version': '2012-10-17', 'Statement': [{'Sid': '', 'Effect': 'Allow', 'Principal': {'Federated': 'arn:aws:iam::xxxxx:saml-provider/provider_name'}, 'Action': 'sts:AssumeRoleWithSAML', 'Condition': {'StringEquals': {'SAML:aud': 'https://signin.aws.amazon.com/saml'}}}]}, 'MaxSessionDuration': 36000}
  </code></pre>