def accept_vpc_peering_connection(conn_id='', name='', region=None, key=None, keyid=None, profile=None, dry_run=False):
 if (not _exactly_one((conn_id, name))):
  raise SaltInvocationError('One (but not both) of vpc_peering_connection_id or name must be provided.')
 conn = _get_conn3(region=region, key=key, keyid=keyid, profile=profile)
 if name:
  conn_id = _vpc_peering_conn_id_for_name(name, conn)
  if (not conn_id):
   raise SaltInvocationError('No ID found for this VPC peering connection! ({0}) Please make sure this VPC peering connection exists or invoke this function with a VPC peering connection ID'.format(name))
 try:
  log.debug('Trying to accept vpc peering connection')
  conn.accept_vpc_peering_connection(DryRun=dry_run, VpcPeeringConnectionId=conn_id)
  return {'msg': 'VPC peering connection accepted.'}
 except botocore.exceptions.ClientError as err:
  log.error('Got an error while trying to accept vpc peering')
  return {'error': salt.utils.boto.get_error(err)}

def accept_vpc_peering_connection ( conn_id = '' , name = '' , region = None , key = None , keyid = None , profile = None , dry_run = False ) : if ( not _exactly_one ( ( conn_id , name ) ) ) : raise SaltInvocationError ( 'One (but not both) of vpc_peering_connection_id or name must be provided.' ) conn = _get_conn3 ( region = region , key = key , keyid = keyid , profile = profile ) if name : conn_id = _vpc_peering_conn_id_for_name ( name , conn ) if ( not conn_id ) : raise SaltInvocationError ( 'No ID found for this VPC peering connection! ({0}) Please make sure this VPC peering connection exists or invoke this function with a VPC peering connection ID' . format ( name ) ) try : log . debug ( 'Trying to accept vpc peering connection' ) conn . accept_vpc_peering_connection ( DryRun = dry_run , VpcPeeringConnectionId = conn_id ) return { 'msg' : 'VPC peering connection accepted.' } except botocore . exceptions . ClientError as err : log . error ( 'Got an error while trying to accept vpc peering' ) return { 'error' : salt . utils . boto . get_error ( err ) }
request a vpc peering connection between two vpcs .