Ensure the Route53 record is deleted.

    name
        The name of the state definition.  This will be used for Name if the latter is
        not provided.

    HostedZoneId
        The ID of the zone to delete the record from.  Exclusive with DomainName.

    DomainName
        The domain name of the zone to delete the record from.  Exclusive with HostedZoneId.

    PrivateZone
        Set to True if the RR to be removed is in a private zone, False if public.

    Name
        Name of the resource record.

    Type
        The record type (A, NS, MX, TXT, etc.)

    SetIdentifier
        Valid for Weighted, Latency, Geolocation, and Failover resource record sets only.
        An identifier that differentiates among multiple resource record sets that have the same
        combination of DNS name and type.  The value of SetIdentifier must be unique for each
        resource record set that has the same combination of DNS name and type. Omit SetIdentifier
        for any other types of record sets.

    region
        The region to connect to.

    key
        Secret key to be used.

    keyid
        Access key to be used.

    profile
        Dict, or pillar key pointing to a dict, containing AWS region/key/keyid.

def rr_absent(name, HostedZoneId=None, DomainName=None, PrivateZone=False,
              Name=None, Type=None, SetIdentifier=None,
              region=None, key=None, keyid=None, profile=None):
    '''
    Ensure the Route53 record is deleted.

    name
        The name of the state definition.  This will be used for Name if the latter is
        not provided.

    HostedZoneId
        The ID of the zone to delete the record from.  Exclusive with DomainName.

    DomainName
        The domain name of the zone to delete the record from.  Exclusive with HostedZoneId.

    PrivateZone
        Set to True if the RR to be removed is in a private zone, False if public.

    Name
        Name of the resource record.

    Type
        The record type (A, NS, MX, TXT, etc.)

    SetIdentifier
        Valid for Weighted, Latency, Geolocation, and Failover resource record sets only.
        An identifier that differentiates among multiple resource record sets that have the same
        combination of DNS name and type.  The value of SetIdentifier must be unique for each
        resource record set that has the same combination of DNS name and type. Omit SetIdentifier
        for any other types of record sets.

    region
        The region to connect to.

    key
        Secret key to be used.

    keyid
        Access key to be used.

    profile
        Dict, or pillar key pointing to a dict, containing AWS region/key/keyid.
    '''
    Name = Name if Name else name

    if Type is None:
        raise SaltInvocationError("'Type' is a required parameter when deleting resource records.")
    ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}

    args = {'Id': HostedZoneId, 'Name': DomainName, 'PrivateZone': PrivateZone,
            'region': region, 'key': key, 'keyid': keyid, 'profile': profile}
    zone = __salt__['boto3_route53.find_hosted_zone'](**args)
    if not zone:
        ret['comment'] = 'Route 53 {} hosted zone {} not found'.format('private' if PrivateZone
                else 'public', DomainName)
        log.info(ret['comment'])
        return ret
    zone = zone[0]
    HostedZoneId = zone['HostedZone']['Id']

    recordsets = __salt__['boto3_route53.get_resource_records'](HostedZoneId=HostedZoneId,
            StartRecordName=Name, StartRecordType=Type, region=region, key=key, keyid=keyid,
            profile=profile)
    if SetIdentifier and recordsets:
        log.debug('Filter recordsets %s by SetIdentifier %s.', recordsets, SetIdentifier)
        recordsets = [r for r in recordsets if r.get('SetIdentifier') == SetIdentifier]
        log.debug('Resulted in recordsets %s.', recordsets)
    if not recordsets:
        ret['comment'] = 'Route 53 resource record {} with type {} already absent.'.format(
                Name, Type)
        return ret
    elif len(recordsets) > 1:
        ret['comment'] = 'Given criteria matched more than one ResourceRecordSet.'
        log.error(ret['comment'])
        ret['result'] = False
        return ret
    ResourceRecordSet = recordsets[0]
    if __opts__['test']:
        ret['comment'] = 'Route 53 resource record {} with type {} would be deleted.'.format(
                Name, Type)
        ret['result'] = None
        return ret

    ChangeBatch = {
        'Changes': [
            {
                'Action': 'DELETE',
                'ResourceRecordSet': ResourceRecordSet,
            }
        ]
    }

    if __salt__['boto3_route53.change_resource_record_sets'](HostedZoneId=HostedZoneId,
            ChangeBatch=ChangeBatch, region=region, key=key, keyid=keyid, profile=profile):
        ret['comment'] = 'Route 53 resource record {} with type {} deleted.'.format(Name, Type)
        log.info(ret['comment'])
        ret['changes']['old'] = ResourceRecordSet
        ret['changes']['new'] = None
    else:
        ret['comment'] = 'Failed to delete Route 53 resource record {} with type {}.'.format(Name,
                Type)
        log.error(ret['comment'])
        ret['result'] = False

    return ret