Request a VPC peering connection between two VPCs.

    .. versionadded:: 2016.11.0

    :param conn_id: The ID to use. String type.
    :param name: The name of this VPC peering connection. String type.
    :param region: The AWS region to use. Type string.
    :param key: The key to use for this connection. Type string.
    :param keyid: The key id to use.
    :param profile: The profile to use.
    :param dry_run: The dry_run flag to set.
    :return: dict

    Warning: Please specify either the ``vpc_peering_connection_id`` or
    ``name`` but not both. Specifying both will result in an error!

    CLI Example:

    .. code-block:: bash

        salt myminion boto_vpc.accept_vpc_peering_connection name=salt-vpc
        # Specify a region
        salt myminion boto_vpc.accept_vpc_peering_connection name=salt-vpc region=us-west-2
        # specify an id
        salt myminion boto_vpc.accept_vpc_peering_connection conn_id=pcx-8a8939e3

def accept_vpc_peering_connection(  # pylint: disable=too-many-arguments
                                  conn_id='',
                                  name='',
                                  region=None,
                                  key=None,
                                  keyid=None,
                                  profile=None,
                                  dry_run=False):
    '''
    Request a VPC peering connection between two VPCs.

    .. versionadded:: 2016.11.0

    :param conn_id: The ID to use. String type.
    :param name: The name of this VPC peering connection. String type.
    :param region: The AWS region to use. Type string.
    :param key: The key to use for this connection. Type string.
    :param keyid: The key id to use.
    :param profile: The profile to use.
    :param dry_run: The dry_run flag to set.
    :return: dict

    Warning: Please specify either the ``vpc_peering_connection_id`` or
    ``name`` but not both. Specifying both will result in an error!

    CLI Example:

    .. code-block:: bash

        salt myminion boto_vpc.accept_vpc_peering_connection name=salt-vpc
        # Specify a region
        salt myminion boto_vpc.accept_vpc_peering_connection name=salt-vpc region=us-west-2
        # specify an id
        salt myminion boto_vpc.accept_vpc_peering_connection conn_id=pcx-8a8939e3

    '''
    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': __utils__['boto.get_error'](err)}