def _key_description(key_metadata, description, region, key, keyid, profile):
    ret = {'result': True, 'comment': '', 'changes': {}}
    if key_metadata['Description'] == description:
        return ret
    if __opts__['test']:
        ret['comment'] = 'Key set to have description updated.'
        ret['result'] = None
        return ret
    rdu = __salt__['boto_kms.update_key_description'](
        key_metadata['KeyId'], description, region, key, keyid, profile
    )
    if 'error' in rdu:
        msg = 'Failed to update key description: {0}.'
        ret['result'] = False
        ret['comment'] = msg.format(rdu['error']['message'])
    else:
        ret['comment'] = 'Updated key description.'
    return ret
dataset/ETHPy150Open saltstack/salt/salt/states/boto_kms.py/_key_description/original