code: def get_role_policy(role_name, policy_name, region=None, key=None,
                      keyid=None, profile=None):
      '''
      Get a role policy.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iam.get_role_policy myirole mypolicy
      '''
      conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  
      try:
          _policy = conn.get_role_policy(role_name, policy_name)
          # I _hate_ you for not giving me an object boto.
          _policy = _policy.get_role_policy_response.policy_document
          # Policy is url encoded
          _policy = _unquote(_policy)
          _policy = salt.utils.json.loads(_policy, object_pairs_hook=odict.OrderedDict)
          return _policy
      except boto.exception.BotoServerError:
          return {f get_role_policy(role_name, policy_name, region=None, key=None,
                      keyid=None, profile=None):
      '''
      Get a role policy.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iam.get_role_policy myirole mypolicy
      '''
      conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  
      try:
          _policy = conn.get_role_policy(role_name, policy_name)
          # I _hate_ you for not giving me an object boto.
          _policy = _policy.get_role_policy_response.policy_document
          # Policy is url encoded
          _policy = _unquote(_policy)
          _policy = salt.utils.json.loads(_policy, object_pairs_hook=odict.OrderedDict)
          return _policy
      except boto.exception.BotoServerError:
          return {}
docs: Get a role policy.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iam.get_role_policy myirole mypolicy