Given an identity pool name, (optionally if an identity pool id is given,
    the given name will be ignored)

    Deletes all identity pools matching the given name, or the specific identity pool with
    the given identity pool id.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_cognitoidentity.delete_identity_pools my_id_pool_name
        salt myminion boto_cognitoidentity.delete_identity_pools '' IdentityPoolId=my_id_pool_id

def delete_identity_pools(IdentityPoolName, IdentityPoolId=None,
               region=None, key=None, keyid=None, profile=None):
    '''
    Given an identity pool name, (optionally if an identity pool id is given,
    the given name will be ignored)

    Deletes all identity pools matching the given name, or the specific identity pool with
    the given identity pool id.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_cognitoidentity.delete_identity_pools my_id_pool_name
        salt myminion boto_cognitoidentity.delete_identity_pools '' IdentityPoolId=my_id_pool_id

    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        ids = _find_identity_pool_ids(IdentityPoolName, IdentityPoolId, conn)

        count = 0
        if ids:
            for pool_id in ids:
                conn.delete_identity_pool(IdentityPoolId=pool_id)
                count += 1
            return {'deleted': True, 'count': count}
        else:
            return {'deleted': False, 'count': count}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}