def cache_cluster_absent(name, wait=600, region=None, key=None, keyid=None, profile=None, **args):
 ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
 args = dict([(k, v) for (k, v) in args.items() if (not k.startswith('_'))])
 exists = __salt__['boto3_elasticache.cache_cluster_exists'](name, region=region, key=key, keyid=keyid, profile=profile)
 if exists:
  if __opts__['test']:
   ret['comment'] = 'Cache cluster {0} would be removed.'.format(name)
   ret['result'] = None
   return ret
  deleted = __salt__['boto3_elasticache.delete_cache_cluster'](name, wait=wait, region=region, key=key, keyid=keyid, profile=profile, **args)
  if deleted:
   ret['changes']['old'] = name
   ret['changes']['new'] = None
  else:
   ret['result'] = False
   ret['comment'] = 'Failed to delete {0} cache cluster.'.format(name)
 else:
  ret['comment'] = 'Cache cluster {0} already absent.'.format(name)
 return ret

def cache_cluster_absent ( name , wait = 600 , region = None , key = None , keyid = None , profile = None , ** args ) : ret = { 'name' : name , 'result' : True , 'comment' : '' , 'changes' : { } } args = dict ( [ ( k , v ) for ( k , v ) in args . items ( ) if ( not k . startswith ( '_' ) ) ] ) exists = __salt__ [ 'boto3_elasticache.cache_cluster_exists' ] ( name , region = region , key = key , keyid = keyid , profile = profile ) if exists : if __opts__ [ 'test' ] : ret [ 'comment' ] = 'Cache cluster {0} would be removed.' . format ( name ) ret [ 'result' ] = None return ret deleted = __salt__ [ 'boto3_elasticache.delete_cache_cluster' ] ( name , wait = wait , region = region , key = key , keyid = keyid , profile = profile , ** args ) if deleted : ret [ 'changes' ] [ 'old' ] = name ret [ 'changes' ] [ 'new' ] = None else : ret [ 'result' ] = False ret [ 'comment' ] = 'Failed to delete {0} cache cluster.' . format ( name ) else : ret [ 'comment' ] = 'Cache cluster {0} already absent.' . format ( name ) return ret
ensure a given cache cluster is deleted .