def delete_vpc_peering_connection(name, conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None):
 log.debug('Called state to delete VPC peering connection')
 ret = {'name': name, 'result': True, 'changes': {}, 'comment': 'Boto VPC peering state'}
 if conn_name:
  vpc_ids = __salt__['boto_vpc.describe_vpc_peering_connection'](conn_name, region=region, key=key, keyid=keyid, profile=profile).get('VPC-Peerings', [])
 else:
  vpc_ids = [conn_id]
 if (not vpc_ids):
  ret['comment'] = 'No VPC connection found, nothing to be done.'
  return ret
 if __opts__['test']:
  if vpc_ids:
   ret['comment'] = 'VPC peering connection would be deleted'
  return ret
 log.debug('Called module to delete VPC peering connection')
 result = __salt__['boto_vpc.delete_vpc_peering_connection'](conn_id=conn_id, conn_name=conn_name, region=region, key=key, keyid=keyid, profile=profile)
 if ('error' in result):
  ret['comment'] = 'Failed to delete VPC peering: {0}'.format(result['error'])
  ret['result'] = False
  return ret
 ret['changes'].update({'old': '', 'new': result['msg']})
 return ret

def delete_vpc_peering_connection ( name , conn_id = None , conn_name = None , region = None , key = None , keyid = None , profile = None ) : log . debug ( 'Called state to delete VPC peering connection' ) ret = { 'name' : name , 'result' : True , 'changes' : { } , 'comment' : 'Boto VPC peering state' } if conn_name : vpc_ids = __salt__ [ 'boto_vpc.describe_vpc_peering_connection' ] ( conn_name , region = region , key = key , keyid = keyid , profile = profile ) . get ( 'VPC-Peerings' , [ ] ) else : vpc_ids = [ conn_id ] if ( not vpc_ids ) : ret [ 'comment' ] = 'No VPC connection found, nothing to be done.' return ret if __opts__ [ 'test' ] : if vpc_ids : ret [ 'comment' ] = 'VPC peering connection would be deleted' return ret log . debug ( 'Called module to delete VPC peering connection' ) result = __salt__ [ 'boto_vpc.delete_vpc_peering_connection' ] ( conn_id = conn_id , conn_name = conn_name , region = region , key = key , keyid = keyid , profile = profile ) if ( 'error' in result ) : ret [ 'comment' ] = 'Failed to delete VPC peering: {0}' . format ( result [ 'error' ] ) ret [ 'result' ] = False return ret ret [ 'changes' ] . update ( { 'old' : '' , 'new' : result [ 'msg' ] } ) return ret
delete a vpc peering connection .