def authorize_cache_security_group_ingress(name, region=None, key=None, keyid=None, profile=None, **args):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 if ('CacheSecurityGroupName' in args):
  log.info("'name: {0}' param being overridden by explicitly provided 'CacheSecurityGroupName: {1}'".format(name, args['CacheSecurityGroupName']))
  name = args['CacheSecurityGroupName']
 else:
  args['CacheSubnetGroupName'] = name
 args = dict([(k, v) for (k, v) in args.items() if (not k.startswith('_'))])
 try:
  conn.authorize_cache_security_group_ingress(**args)
  log.info('Authorized {0} to cache security group {1}.'.format(args['EC2SecurityGroupName'], name))
  return True
 except botocore.exceptions.ClientError as e:
  log.error('Failed to update security group {0}: {1}'.format(name, e))
  return False

def authorize_cache_security_group_ingress ( name , region = None , key = None , keyid = None , profile = None , ** args ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if ( 'CacheSecurityGroupName' in args ) : log . info ( "'name: {0}' param being overridden by explicitly provided 'CacheSecurityGroupName: {1}'" . format ( name , args [ 'CacheSecurityGroupName' ] ) ) name = args [ 'CacheSecurityGroupName' ] else : args [ 'CacheSubnetGroupName' ] = name args = dict ( [ ( k , v ) for ( k , v ) in args . items ( ) if ( not k . startswith ( '_' ) ) ] ) try : conn . authorize_cache_security_group_ingress ( ** args ) log . info ( 'Authorized {0} to cache security group {1}.' . format ( args [ 'EC2SecurityGroupName' ] , name ) ) return True except botocore . exceptions . ClientError as e : log . error ( 'Failed to update security group {0}: {1}' . format ( name , e ) ) return False
authorize network ingress from an ec2 security group to a cache security group .