def METHOD_NAME(client, alias_id, alias_name, canonical_id, mount_accessor):
    try:
        alias_details = client.secrets.identity.read_entity_alias(alias_id=alias_id)
    except Exception as e:
        return {'failed': True, 'msg': str(e)}
    if alias_details['data']['canonical_id'] == canonical_id:
        return {'changed': False}
    try:
        client.secrets.identity.update_entity_alias(
            alias_id=alias_id,
            name=alias_name,
            canonical_id=canonical_id,
            mount_accessor=mount_accessor
        )
    except Exception as e:
        return {'failed': True, 'msg': str(e)}
    return {'changed': True}