Delete a VPC peering connection.

    .. versionadded:: 2016.11.0

    conn_id
        The connection ID to check.  Exclusive with conn_name.

    conn_name
        The connection name to check.  Exclusive with conn_id.

    region
        Region to connect to.

    key
        Secret key to be used.

    keyid
        Access key to be used.

    profile
        A dict with region, key and keyid, or a pillar key (string) that
        contains a dict with region, key and keyid.

    dry_run
        If True, skip application and simply return projected status.

    CLI Example:

    .. code-block:: bash

        # Create a named VPC peering connection
        salt myminion boto_vpc.delete_vpc_peering_connection conn_name=salt-vpc
        # Specify a region
        salt myminion boto_vpc.delete_vpc_peering_connection conn_name=salt-vpc region=us-west-2
        # specify an id
        salt myminion boto_vpc.delete_vpc_peering_connection conn_id=pcx-8a8939e3

def delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None,
                                  key=None, keyid=None, profile=None, dry_run=False):
    '''
    Delete a VPC peering connection.

    .. versionadded:: 2016.11.0

    conn_id
        The connection ID to check.  Exclusive with conn_name.

    conn_name
        The connection name to check.  Exclusive with conn_id.

    region
        Region to connect to.

    key
        Secret key to be used.

    keyid
        Access key to be used.

    profile
        A dict with region, key and keyid, or a pillar key (string) that
        contains a dict with region, key and keyid.

    dry_run
        If True, skip application and simply return projected status.

    CLI Example:

    .. code-block:: bash

        # Create a named VPC peering connection
        salt myminion boto_vpc.delete_vpc_peering_connection conn_name=salt-vpc
        # Specify a region
        salt myminion boto_vpc.delete_vpc_peering_connection conn_name=salt-vpc region=us-west-2
        # specify an id
        salt myminion boto_vpc.delete_vpc_peering_connection conn_id=pcx-8a8939e3

    '''
    if not _exactly_one((conn_id, conn_name)):
        raise SaltInvocationError('Exactly one of conn_id or '
                                  'conn_name must be provided.')

    conn = _get_conn3(region=region, key=key, keyid=keyid, profile=profile)
    if conn_name:
        conn_id = _vpc_peering_conn_id_for_name(conn_name, conn)
        if not conn_id:
            raise SaltInvocationError("Couldn't resolve VPC peering connection "
                                      "{0} to an ID".format(conn_name))
    try:
        log.debug('Trying to delete vpc peering connection')
        conn.delete_vpc_peering_connection(DryRun=dry_run, VpcPeeringConnectionId=conn_id)
        return {'msg': 'VPC peering connection deleted.'}
    except botocore.exceptions.ClientError as err:
        e = __utils__['boto.get_error'](err)
        log.error('Failed to delete VPC peering %s: %s', conn_name or conn_id, e)
        return {'error': e}