Check to see if a replication group exists.

    Example:

    .. code-block:: bash

        salt myminion boto3_elasticache.replication_group_exists myelasticache
509349
def replication_group_exists(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    return bool(describe_replication_groups(name=name, region=region, key=key, keyid=keyid,
                profile=profile))
528620
def delete_replication_group(name, wait=600, region=None, key=None, keyid=None, profile=None, **args):
    '''
    
    '''
    return _delete_resource(name, name_param='ReplicationGroupId', desc='replication group',
                            res_type='replication_group', wait=wait, status_param='Status',
                            region=region, key=key, keyid=keyid, profile=profile, **args)
708814
def check_if_exists(self):
        """"""
        if self.req is None:
            return False
        try:
            self.satisfied_by = pkg_resources.get_distribution(self.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            self.conflicts_with = pkg_resources.get_distribution(self.req.project_name)
        return True
124310
def exists(name, delimiter=DEFAULT_TARGET_DELIM):
    '''
    
    '''
    name = re.sub(delimiter, DEFAULT_TARGET_DELIM, name)
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': 'Grain exists'}
    _non_existent = object()
    existing = __salt__['grains.get'](name, _non_existent)
    if existing is _non_existent:
        ret['result'] = False
        ret['comment'] = 'Grain does not exist'
    return ret
491393
def key_exists(self, section, key):
        

        LOGGER.debug("> Checking '{0}' key existence in '{1}' section.".format(key, section))

        self.__settings.beginGroup(section)
        exists = self.__settings.contains(key)
        self.__settings.endGroup()
        return exists
1232248
def create_replication_group(name, primary_cluster_id, replication_group_description,
                             wait=None, region=None, key=None,
                             keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    if not conn:
        return None
    try:
        cc = conn.create_replication_group(name, primary_cluster_id,
                                           replication_group_description)
        if not wait:
            log.info('Created cache cluster %s.', name)
            return True
        while True:
            time.sleep(3)
            config = describe_replication_group(name, region, key, keyid, profile)
            if not config:
                return True
            if config['status'] == 'available':
                return True
    except boto.exception.BotoServerError as e:
        msg = 'Failed to create replication group {0}.'.format(name)
        log.error(msg)
        log.debug(e)
        return {}
555346
def _security_group_present(name, description, vpc_id=None, vpc_name=None,
                            region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    ret = {'result': True, 'comment': '', 'changes': {}}
    exists = __salt__['boto_secgroup.exists'](name, region, key, keyid,
                                              profile, vpc_id, vpc_name)
    if not exists:
        if __opts__['test']:
            ret['comment'] = 'Security group {0} is set to be created.'.format(name)
            ret['result'] = None
            return ret
        created = __salt__['boto_secgroup.create'](name=name, description=description,
                                                   vpc_id=vpc_id, vpc_name=vpc_name,
                                                   region=region, key=key, keyid=keyid,
                                                   profile=profile)
        if created:
            ret['changes']['old'] = {'secgroup': None}
            sg = __salt__['boto_secgroup.get_config'](name=name, group_id=None, region=region, key=key,
                                              keyid=keyid, profile=profile, vpc_id=vpc_id,
                                              vpc_name=vpc_name)
            ret['changes']['new'] = {'secgroup': sg}
            ret['comment'] = 'Security group {0} created.'.format(name)
        else:
            ret['result'] = False
            ret['comment'] = 'Failed to create {0} security group.'.format(name)
    else:
        ret['comment'] = 'Security group {0} present.'.format(name)
    return ret
569458
def pool_exists(service, name):
    """"""
    try:
        out = check_output(['rados', '--id', service, 'lspools'])
        if six.PY3:
            out = out.decode('UTF-8')
    except CalledProcessError:
        return False

    return name in out.split()
12718
def exists(self):
    
    try:
      info = self._api.tables_get(self._name_parts)
    except google.datalab.utils.RequestException as e:
      if e.status == 404:
        return False
      raise e
    except Exception as e:
      raise e
    self._info = info
    return True
141393
def has_any_group?(*group_list)
      return :system_admin if system_admin?
      return false if anonymous?

      r = group_list.select{|g| effective_groups.include?(g.upcase)}

      r.blank? ? false : r
    end
1042105
def get_all_cache_subnet_groups(name=None, region=None, key=None,
                                keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        marker = ''
        groups = []
        while marker is not None:
            ret = conn.describe_cache_subnet_groups(cache_subnet_group_name=name,
                                                    marker=marker)
            trimmed = ret.get('DescribeCacheSubnetGroupsResponse',
                              {}).get('DescribeCacheSubnetGroupsResult', {})
            groups += trimmed.get('CacheSubnetGroups', [])
            marker = trimmed.get('Marker', None)
        if not groups:
            log.debug('No ElastiCache subnet groups found.')
        return groups
    except boto.exception.BotoServerError as e:
        log.error(e)
        return []
917851
def exists(self, digest):
        
        return self.conn.client.blob_exists(self.container_name, digest)
633383
def exists(self):
        
        try:
            self.stat()
        except OSError as e:
            if e.errno not in (ENOENT, ENOTDIR):
                raise
            return False
        return True
547426
public boolean exists() {
		try {
			if(!isBinary)return getJedisCommands(groupName).exists(key);
			if(isCluster(groupName)){
				return getBinaryJedisClusterCommands(groupName).exists(keyBytes);
			}
			return getBinaryJedisCommands(groupName).exists(keyBytes);
		} finally {
			getJedisProvider(groupName).release();
		}
		
	}
621409
def exists(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        elb = conn.get_all_load_balancers(load_balancer_names=[name])
        if elb:
            return True
        else:
            log.debug('The load balancer does not exist in region %s', region)
            return False
    except boto.exception.BotoServerError as error:
        log.warning(error)
        return False
1261374
def server_exists(s_name, ip=None, s_state=None, **connection_args):
    '''
    
    '''
    server = _server_get(s_name, **connection_args)
    if server is None:
        return False
    if ip is not None and ip != server.get_ipaddress():
        return False
    if s_state is not None and s_state.upper() != server.get_state():
        return False
    return True
75795
public boolean checkExists(TriggerKey triggerKey, T jedis){
        return jedis.exists(redisSchema.triggerHashKey(triggerKey));
    }