def get_all_topics(region=None, key=None, keyid=None, profile=None):
    '''
    Returns a list of the all topics..

    CLI example::

        salt myminion boto_sns.get_all_topics
    '''
    cache_key = _cache_get_key()
    try:
        return __context__[cache_key]
    except __HOLE__:
        pass

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    __context__[cache_key] = {}
    # TODO: support >100 SNS topics (via NextToken)
    topics = conn.get_all_topics()
    for t in topics['ListTopicsResponse']['ListTopicsResult']['Topics']:
        short_name = t['TopicArn'].split(':')[-1]
        __context__[cache_key][short_name] = t['TopicArn']
    return __context__[cache_key]
dataset/ETHPy150Open saltstack/salt/salt/modules/boto_sns.py/get_all_topics